From 9956e43c8e0f2424eb6d19ee03b6fb83e6d00f42 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sat, 16 Apr 2016 22:58:49 +0100 Subject: [PATCH 001/324] initial --- .gitignore | 38 ++++ .jscsrc | 10 + LICENSE | 201 ++++++++++++++++++ README.md | 6 + package.json | 56 +++++ src/client/Client.js | 34 +++ src/client/ClientManager.js | 34 +++ src/client/rest/RESTManager.js | 53 +++++ src/client/rest/RESTMethods.js | 37 ++++ src/client/rest/UserAgentManager.js | 24 +++ src/client/websocket/WebSocketManager.js | 79 +++++++ .../packets/WebSocketPacketManager.js | 44 ++++ .../packets/handlers/AbstractHandler.js | 14 ++ .../packets/handlers/ChannelCreate.js | 28 +++ .../packets/handlers/ChannelDelete.js | 31 +++ .../packets/handlers/ChannelUpdate.js | 33 +++ .../websocket/packets/handlers/GuildBanAdd.js | 33 +++ .../packets/handlers/GuildBanRemove.js | 33 +++ .../websocket/packets/handlers/GuildCreate.js | 38 ++++ .../websocket/packets/handlers/GuildDelete.js | 41 ++++ .../packets/handlers/GuildMemberAdd.js | 32 +++ .../packets/handlers/GuildMemberRemove.js | 33 +++ .../packets/handlers/GuildMemberUpdate.js | 33 +++ .../websocket/packets/handlers/GuildUpdate.js | 32 +++ .../websocket/packets/handlers/Ready.js | 36 ++++ src/index.js | 15 ++ src/structures/Channel.js | 16 ++ src/structures/ClientUser.js | 17 ++ src/structures/DMChannel.js | 17 ++ src/structures/Guild.js | 91 ++++++++ src/structures/Message.js | 9 + src/structures/ServerChannel.js | 22 ++ src/structures/TextChannel.js | 13 ++ src/structures/User.js | 20 ++ src/structures/VoiceChannel.js | 16 ++ src/structures/datastore/AbstractDataStore.js | 43 ++++ src/structures/datastore/ClientDataStore.js | 111 ++++++++++ src/structures/datastore/GuildDataStore.js | 16 ++ .../datastore/TextChannelDataStore.js | 12 ++ src/util/CloneObject.js | 7 + src/util/Constants.js | 118 ++++++++++ src/util/MergeDefault.js | 19 ++ test/random.js | 39 ++++ 43 files changed, 1634 insertions(+) create mode 100644 .gitignore create mode 100644 .jscsrc create mode 100644 LICENSE create mode 100644 README.md create mode 100644 package.json create mode 100644 src/client/Client.js create mode 100644 src/client/ClientManager.js create mode 100644 src/client/rest/RESTManager.js create mode 100644 src/client/rest/RESTMethods.js create mode 100644 src/client/rest/UserAgentManager.js create mode 100644 src/client/websocket/WebSocketManager.js create mode 100644 src/client/websocket/packets/WebSocketPacketManager.js create mode 100644 src/client/websocket/packets/handlers/AbstractHandler.js create mode 100644 src/client/websocket/packets/handlers/ChannelCreate.js create mode 100644 src/client/websocket/packets/handlers/ChannelDelete.js create mode 100644 src/client/websocket/packets/handlers/ChannelUpdate.js create mode 100644 src/client/websocket/packets/handlers/GuildBanAdd.js create mode 100644 src/client/websocket/packets/handlers/GuildBanRemove.js create mode 100644 src/client/websocket/packets/handlers/GuildCreate.js create mode 100644 src/client/websocket/packets/handlers/GuildDelete.js create mode 100644 src/client/websocket/packets/handlers/GuildMemberAdd.js create mode 100644 src/client/websocket/packets/handlers/GuildMemberRemove.js create mode 100644 src/client/websocket/packets/handlers/GuildMemberUpdate.js create mode 100644 src/client/websocket/packets/handlers/GuildUpdate.js create mode 100644 src/client/websocket/packets/handlers/Ready.js create mode 100644 src/index.js create mode 100644 src/structures/Channel.js create mode 100644 src/structures/ClientUser.js create mode 100644 src/structures/DMChannel.js create mode 100644 src/structures/Guild.js create mode 100644 src/structures/Message.js create mode 100644 src/structures/ServerChannel.js create mode 100644 src/structures/TextChannel.js create mode 100644 src/structures/User.js create mode 100644 src/structures/VoiceChannel.js create mode 100644 src/structures/datastore/AbstractDataStore.js create mode 100644 src/structures/datastore/ClientDataStore.js create mode 100644 src/structures/datastore/GuildDataStore.js create mode 100644 src/structures/datastore/TextChannelDataStore.js create mode 100644 src/util/CloneObject.js create mode 100644 src/util/Constants.js create mode 100644 src/util/MergeDefault.js create mode 100644 test/random.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..d1ca39f79 --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +# Created by https://www.gitignore.io + +.tmp/ +.vscode/ + +### Node ### +# Logs +logs +*.log + +test/auth.json + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git +node_modules +test/auth.json +examples/auth.json +docs/_build \ No newline at end of file diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 000000000..d636656da --- /dev/null +++ b/.jscsrc @@ -0,0 +1,10 @@ +{ + "preset": "airbnb", + "validateIndentation": "\t", + "maximumLineLength": 140, + "maxErrors": 5000, + "disallowMultipleVarDecl": false, + "disallowSpacesInsideObjectBrackets": false, + "disallowMixedSpacesAndTabs": false, + "excludeFiles": [] +} \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..8dada3eda --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 000000000..2514699cb --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +

+ + discord.js
+
+

REWRITE

+

\ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 000000000..08a7c794e --- /dev/null +++ b/package.json @@ -0,0 +1,56 @@ +{ + "name": "discord.js", + "version": "7.0.0", + "description": "A way to interface with the Discord API", + "main": "./src/index", + "scripts": { + "test": "jscs src && node test/random" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/hydrabolt/discord.js.git" + }, + "keywords": [ + "discord", + "api", + "bot", + "client", + "node", + "discordapp" + ], + "author": "Amish Shah ", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/hydrabolt/discord.js/issues" + }, + "homepage": "https://github.com/hydrabolt/discord.js#readme", + "dependencies": { + "babel-plugin-transform-runtime": "^6.6.0", + "object.entries": "^1.0.3", + "object.values": "^1.0.3", + "superagent": "^1.5.0", + "unpipe": "^1.0.0", + "ws": "^0.8.1" + }, + "devDependencies": { + "babel-preset-es2015": "^6.6.0", + "babel-preset-stage-3": "^6.5.0", + "grunt": "^0.4.5", + "grunt-babel": "^6.0.0", + "grunt-browserify": "^4.0.1", + "grunt-contrib-uglify": "^0.11.0", + "grunt-jscs": "^2.8.0", + "jscs": "^2.11.0", + "load-grunt-tasks": "^3.3.0" + }, + "optionalDependencies": { + "node-opus": "^0.1.11" + }, + "engines": { + "node": ">=0.12.7" + }, + "browser": { + "./src/Util/TokenCacher.js": "./src/Util/TokenCacher-shim.js", + "./lib/Util/TokenCacher.js": "./lib/Util/TokenCacher-shim.js" + } +} diff --git a/src/client/Client.js b/src/client/Client.js new file mode 100644 index 000000000..634cc790f --- /dev/null +++ b/src/client/Client.js @@ -0,0 +1,34 @@ +'use strict'; + +const EventEmitter = require('events').EventEmitter; +const MergeDefault = require('../util/MergeDefault'); +const Constants = require('../util/Constants'); +const RESTManager = require('./rest/RestManager'); +const ClientDataStore = require('../structures/DataStore/ClientDataStore'); +const ClientManager = require('./ClientManager'); +const WebSocketManager = require('./websocket/WebSocketManager'); + +class Client extends EventEmitter{ + + constructor(options) { + super(); + this.options = MergeDefault(Constants.DefaultOptions, options); + this.rest = new RESTManager(this); + this.store = new ClientDataStore(this); + this.manager = new ClientManager(this); + this.ws = new WebSocketManager(this); + } + + login(email, password) { + if (password) { + // login with email and password + return this.rest.methods.LoginEmailPassword(email, password); + } else { + // login with token + return this.rest.methods.LoginToken(email); + } + } + +} + +module.exports = Client; diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js new file mode 100644 index 000000000..00ffc5c69 --- /dev/null +++ b/src/client/ClientManager.js @@ -0,0 +1,34 @@ +'use strict'; + +const Constants = require('../util/Constants'); + +class ClientManager { + + constructor(client) { + this.client = client; + this.heartbeatInterval = null; + } + + connectToWebSocket(token, resolve, reject) { + this.client.store.token = token; + this.client.rest.methods.GetGateway() + .then(gateway => { + this.client.ws.connect(gateway); + this.client.once(Constants.Events.READY, () => resolve(token)); + }) + .catch(reject); + + setTimeout(() => reject(Constants.Errors.TOOK_TOO_LONG), 1000 * 15); + } + + setupKeepAlive(time) { + this.heartbeatInterval = setInterval(() => { + this.client.ws.send({ + op: Constants.OPCodes.HEARTBEAT, + d: Date.now(), + }); + }, time); + } +} + +module.exports = ClientManager; diff --git a/src/client/rest/RESTManager.js b/src/client/rest/RESTManager.js new file mode 100644 index 000000000..5cda94ccd --- /dev/null +++ b/src/client/rest/RESTManager.js @@ -0,0 +1,53 @@ +'use strict'; + +const request = require('superagent'); +const Constants = require('../../util/Constants'); +const UserAgentManager = require('./UserAgentManager'); +const RESTMethods = require('./RESTMethods'); + +class RESTManager{ + + constructor(client) { + this.client = client; + this.queue = []; + this.userAgentManager = new UserAgentManager(this); + this.methods = new RESTMethods(this); + } + + makeRequest(method, url, auth, data, file) { + /* + file is {file, name} + */ + let apiRequest = request[method](url); + + if (auth) { + if (this.client.store.token) { + apiRequest.set('authorization', this.client.store.token); + } else { + throw Constants.Errors.NO_TOKEN; + } + } + + if (data) { + apiRequest.send(data); + } + + if (file) { + apiRequest.attach('file', file.file, file.name); + } + + apiRequest.set('User-Agent', this.userAgentManager.userAgent); + + return new Promise((resolve, reject) => { + apiRequest.end((err, res) => { + if (err) { + reject(err); + } else { + resolve(res ? res.body || {} : {}); + } + }); + }); + } +}; + +module.exports = RESTManager; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js new file mode 100644 index 000000000..228f6f7da --- /dev/null +++ b/src/client/rest/RESTMethods.js @@ -0,0 +1,37 @@ +'use strict'; + +const Constants = require('../../util/Constants'); + +class RESTMethods{ + constructor(restManager) { + this.rest = restManager; + } + + LoginEmailPassword(email, password) { + return new Promise((resolve, reject) => { + + this.rest.makeRequest('post', Constants.Endpoints.LOGIN, false, { email, password }) + .then(data => { + this.rest.client.manager.connectToWebSocket(data.token, resolve, reject); + }) + .catch(reject); + + }); + } + + LoginToken(token) { + return new Promise((resolve, reject) => { + this.rest.client.manager.connectToWebSocket(token, resolve, reject); + }); + } + + GetGateway() { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.GATEWAY, true) + .then(res => resolve(res.url)) + .catch(reject); + }); + } +} + +module.exports = RESTMethods; diff --git a/src/client/rest/UserAgentManager.js b/src/client/rest/UserAgentManager.js new file mode 100644 index 000000000..9fb075fca --- /dev/null +++ b/src/client/rest/UserAgentManager.js @@ -0,0 +1,24 @@ +'use strict'; + +const Constants = require('../../util/Constants'); + +class UserAgentManager{ + constructor(restManager) { + this.restManager = restManager; + this._userAgent = { + url: 'https://github.com/hydrabolt/discord.js', + version: Constants.Package.version, + }; + } + + set(info) { + this._userAgent.url = info.url || 'https://github.com/hydrabolt/discord.js'; + this._userAgent.version = info.version || Constants.Package.version; + } + + get userAgent() { + return `DiscordBot (${this._userAgent.url}, ${this._userAgent.version})`; + } +} + +module.exports = UserAgentManager; diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js new file mode 100644 index 000000000..ae9b8c550 --- /dev/null +++ b/src/client/websocket/WebSocketManager.js @@ -0,0 +1,79 @@ +'use strict'; + +const WebSocket = require('ws'); +const Constants = require('../../util/Constants'); +const zlib = require('zlib'); +const PacketManager = require('./packets/WebSocketPacketManager'); + +class WebSocketManager { + + constructor(client) { + this.client = client; + this.ws = null; + this.packetManager = new PacketManager(this); + this.emittedReady = false; + } + + connect(gateway) { + gateway += `/?v=${this.client.options.protocol_version}`; + this.ws = new WebSocket(gateway); + this.ws.onopen = () => this.EventOpen(); + this.ws.onclose = () => this.EventClose(); + this.ws.onmessage = (e) => this.EventMessage(e); + this.ws.onerror = (e) => this.EventError(e); + } + + send(data) { + this.ws.send(JSON.stringify(data)); + } + + EventOpen() { + let payload = this.client.options.ws; + payload.token = this.client.store.token; + + this.send({ + op: Constants.OPCodes.IDENTIFY, + d: payload, + }); + } + + EventClose() { + + } + + EventMessage(event) { + let packet; + try { + if (event.binary) { + event.data = zlib.inflateSync(event.data).toString(); + } + + packet = JSON.parse(event.data); + } catch (e) { + return this.EventError(Constants.Errors.BAD_WS_MESSAGE); + } + + this.packetManager.handle(packet); + } + + EventError(e) { + + } + + checkIfReady() { + if (!this.emittedReady) { + let unavailableCount = 0; + + for (let guildID in this.client.store.data.guilds) { + unavailableCount += this.client.store.data.guilds[guildID].available ? 0 : 1; + } + + if (unavailableCount === 0) { + this.client.emit(Constants.Events.READY); + this.emittedReady = true; + } + } + } +} + +module.exports = WebSocketManager; diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js new file mode 100644 index 000000000..cb114bad6 --- /dev/null +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -0,0 +1,44 @@ +'use strict'; + +const Constants = require('../../../util/Constants'); + +class WebSocketPacketManager { + + constructor(websocketManager) { + this.ws = websocketManager; + this.handlers = {}; + + this.register(Constants.WSEvents.READY, 'Ready'); + this.register(Constants.WSEvents.GUILD_CREATE, 'GuildCreate'); + this.register(Constants.WSEvents.GUILD_DELETE, 'GuildDelete'); + this.register(Constants.WSEvents.GUILD_UPDATE, 'GuildUpdate'); + this.register(Constants.WSEvents.GUILD_BAN_ADD, 'GuildBanAdd'); + this.register(Constants.WSEvents.GUILD_BAN_REMOVE, 'GuildBanRemove'); + this.register(Constants.WSEvents.GUILD_MEMBER_ADD, 'GuildMemberAdd'); + this.register(Constants.WSEvents.GUILD_MEMBER_REMOVE, 'GuildMemberRemove'); + this.register(Constants.WSEvents.GUILD_MEMBER_UPDATE, 'GuildMemberUpdate'); + this.register(Constants.WSEvents.CHANNEL_CREATE, 'ChannelCreate'); + this.register(Constants.WSEvents.CHANNEL_DELETE, 'ChannelDelete'); + this.register(Constants.WSEvents.CHANNEL_UPDATE, 'ChannelUpdate'); + } + + get client() { + return this.ws.client; + } + + register(event, handle) { + let Handler = require(`./handlers/${handle}`); + this.handlers[event] = new Handler(this); + } + + handle(packet) { + if (this.handlers[packet.t]) { + return this.handlers[packet.t].handle(packet); + } + + return false; + } + +} + +module.exports = WebSocketPacketManager; diff --git a/src/client/websocket/packets/handlers/AbstractHandler.js b/src/client/websocket/packets/handlers/AbstractHandler.js new file mode 100644 index 000000000..9ab096dd6 --- /dev/null +++ b/src/client/websocket/packets/handlers/AbstractHandler.js @@ -0,0 +1,14 @@ +'use strict'; + +class AbstractHandler { + + constructor(packetManager) { + this.packetManager = packetManager; + } + + handle(packet) { + + } +} + +module.exports = AbstractHandler; diff --git a/src/client/websocket/packets/handlers/ChannelCreate.js b/src/client/websocket/packets/handlers/ChannelCreate.js new file mode 100644 index 000000000..d938be358 --- /dev/null +++ b/src/client/websocket/packets/handlers/ChannelCreate.js @@ -0,0 +1,28 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); + +const ClientUser = Structure('ClientUser'); +const Guild = Structure('Guild'); +const DMChannel = Structure('DMChannel'); + +const Constants = require('../../../../util/Constants'); + +class ChannelCreateHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let channel = client.store.NewChannel(data); + + } + +}; + +module.exports = ChannelCreateHandler; diff --git a/src/client/websocket/packets/handlers/ChannelDelete.js b/src/client/websocket/packets/handlers/ChannelDelete.js new file mode 100644 index 000000000..e94d052a0 --- /dev/null +++ b/src/client/websocket/packets/handlers/ChannelDelete.js @@ -0,0 +1,31 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); + +const ClientUser = Structure('ClientUser'); +const Guild = Structure('Guild'); +const ServerChannel = Structure('ServerChannel'); + +const Constants = require('../../../../util/Constants'); + +class ChannelDeleteHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let channel = client.store.get('channels', data.id); + + if (channel) { + client.store.KillChannel(channel); + } + } + +}; + +module.exports = ChannelDeleteHandler; diff --git a/src/client/websocket/packets/handlers/ChannelUpdate.js b/src/client/websocket/packets/handlers/ChannelUpdate.js new file mode 100644 index 000000000..d44a15855 --- /dev/null +++ b/src/client/websocket/packets/handlers/ChannelUpdate.js @@ -0,0 +1,33 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); + +const ClientUser = Structure('ClientUser'); +const Guild = Structure('Guild'); +const ServerChannel = Structure('ServerChannel'); + +const Constants = require('../../../../util/Constants'); +const CloneObject = require('../../../../util/CloneObject'); + +class ChannelUpdateHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let channel = client.store.get('channels', data.id); + + if (channel) { + client.store.UpdateChannel(channel, data); + } + + } + +}; + +module.exports = ChannelUpdateHandler; diff --git a/src/client/websocket/packets/handlers/GuildBanAdd.js b/src/client/websocket/packets/handlers/GuildBanAdd.js new file mode 100644 index 000000000..7294b2fca --- /dev/null +++ b/src/client/websocket/packets/handlers/GuildBanAdd.js @@ -0,0 +1,33 @@ +'use strict'; + +// ##untested handler## + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); + +const ClientUser = Structure('ClientUser'); +const Guild = Structure('Guild'); + +const Constants = require('../../../../util/Constants'); + +class GuildBanAddHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let guild = client.store.get('guilds', data.guild_id); + let user = client.store.get('users', data.user.id); + + if (guild && user) { + client.emit(Constants.Events.GUILD_BAN_ADD, guild, user); + } + } + +}; + +module.exports = GuildBanAddHandler; diff --git a/src/client/websocket/packets/handlers/GuildBanRemove.js b/src/client/websocket/packets/handlers/GuildBanRemove.js new file mode 100644 index 000000000..ec792f1bf --- /dev/null +++ b/src/client/websocket/packets/handlers/GuildBanRemove.js @@ -0,0 +1,33 @@ +'use strict'; + +// ##untested handler## + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); + +const ClientUser = Structure('ClientUser'); +const Guild = Structure('Guild'); + +const Constants = require('../../../../util/Constants'); + +class GuildBanRemoveHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let guild = client.store.get('guilds', data.guild_id); + let user = client.store.get('users', data.user.id); + + if (guild && user) { + client.emit(Constants.Events.GUILD_BAN_REMOVE, guild, user); + } + } + +}; + +module.exports = GuildBanRemoveHandler; diff --git a/src/client/websocket/packets/handlers/GuildCreate.js b/src/client/websocket/packets/handlers/GuildCreate.js new file mode 100644 index 000000000..96777a79d --- /dev/null +++ b/src/client/websocket/packets/handlers/GuildCreate.js @@ -0,0 +1,38 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); + +const ClientUser = Structure('ClientUser'); +const Guild = Structure('Guild'); + +const Constants = require('../../../../util/Constants'); + +class GuildCreateHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let guild = client.store.get('guilds', data.id); + + if (guild) { + if (!guild.available && !data.unavailable) { + // a newly available guild + guild.setup(data); + this.packetManager.ws.checkIfReady(); + } + } else { + // a new guild + client.store.NewGuild(data); + } + + } + +}; + +module.exports = GuildCreateHandler; diff --git a/src/client/websocket/packets/handlers/GuildDelete.js b/src/client/websocket/packets/handlers/GuildDelete.js new file mode 100644 index 000000000..550628ac0 --- /dev/null +++ b/src/client/websocket/packets/handlers/GuildDelete.js @@ -0,0 +1,41 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); + +const ClientUser = Structure('ClientUser'); +const Guild = Structure('Guild'); + +const Constants = require('../../../../util/Constants'); + +class GuildDeleteHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let guild = client.store.get('guilds', data.id); + + if (guild) { + if (guild.available && data.unavailable) { + // guild is unavailable + guild.available = false; + client.emit(Constants.Events.GUILD_UNAVAILABLE, guild); + } else { + // delete guild + client.store.KillGuild(guild); + } + } else { + // it's not there! :( + client.emit('warn', 'guild deleted but not cached in first place. missed packet?'); + } + + } + +}; + +module.exports = GuildDeleteHandler; diff --git a/src/client/websocket/packets/handlers/GuildMemberAdd.js b/src/client/websocket/packets/handlers/GuildMemberAdd.js new file mode 100644 index 000000000..23a475f96 --- /dev/null +++ b/src/client/websocket/packets/handlers/GuildMemberAdd.js @@ -0,0 +1,32 @@ +'use strict'; + +// ##untested handler## + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); + +const ClientUser = Structure('ClientUser'); +const Guild = Structure('Guild'); + +const Constants = require('../../../../util/Constants'); + +class GuildMemberAddHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let guild = client.store.get('guilds', data.guild_id); + + if (guild) { + guild._addMember(data); + } + } + +}; + +module.exports = GuildMemberAddHandler; diff --git a/src/client/websocket/packets/handlers/GuildMemberRemove.js b/src/client/websocket/packets/handlers/GuildMemberRemove.js new file mode 100644 index 000000000..53a20fa2a --- /dev/null +++ b/src/client/websocket/packets/handlers/GuildMemberRemove.js @@ -0,0 +1,33 @@ +'use strict'; + +// ##untested handler## + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); + +const ClientUser = Structure('ClientUser'); +const Guild = Structure('Guild'); + +const Constants = require('../../../../util/Constants'); + +class GuildMemberRemoveHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let guild = client.store.get('guilds', data.guild_id); + let user = client.store.get('users', data.user.id); + + if (guild && user) { + guild._removeMember(user); + } + } + +}; + +module.exports = GuildMemberRemoveHandler; diff --git a/src/client/websocket/packets/handlers/GuildMemberUpdate.js b/src/client/websocket/packets/handlers/GuildMemberUpdate.js new file mode 100644 index 000000000..e54daaa8f --- /dev/null +++ b/src/client/websocket/packets/handlers/GuildMemberUpdate.js @@ -0,0 +1,33 @@ +'use strict'; + +// ##untested handler## + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); + +const ClientUser = Structure('ClientUser'); +const Guild = Structure('Guild'); + +const Constants = require('../../../../util/Constants'); + +class GuildMemberUpdateHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let guild = client.store.get('guilds', data.guild_id); + let user = client.store.get('users', data.user.id); + + if (guild) { + guild._updateMember(user, data); + } + } + +}; + +module.exports = GuildMemberUpdateHandler; diff --git a/src/client/websocket/packets/handlers/GuildUpdate.js b/src/client/websocket/packets/handlers/GuildUpdate.js new file mode 100644 index 000000000..e74effbfc --- /dev/null +++ b/src/client/websocket/packets/handlers/GuildUpdate.js @@ -0,0 +1,32 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); + +const ClientUser = Structure('ClientUser'); +const Guild = Structure('Guild'); + +const Constants = require('../../../../util/Constants'); +const CloneObject = require('../../../../util/CloneObject'); + +class GuildUpdateHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let guild = client.store.get('guilds', data.id); + + if (guild) { + client.store.UpdateGuild(guild, data); + } + + } + +}; + +module.exports = GuildUpdateHandler; diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js new file mode 100644 index 000000000..cd512a5e8 --- /dev/null +++ b/src/client/websocket/packets/handlers/Ready.js @@ -0,0 +1,36 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); + +const ClientUser = Structure('ClientUser'); +const Guild = Structure('Guild'); +const DMChannel = Structure('DMChannel'); + +class ReadyHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + client.manager.setupKeepAlive(data.heartbeat_interval); + + client.store.user = client.store.add('users', new ClientUser(client, data.user)); + + for (let guild of data.guilds) { + client.store.NewGuild(guild); + } + + for (let privateDM of data.private_channels) { + client.store.NewChannel(privateDM); + } + + } + +}; + +module.exports = ReadyHandler; diff --git a/src/index.js b/src/index.js new file mode 100644 index 000000000..1c2103a4c --- /dev/null +++ b/src/index.js @@ -0,0 +1,15 @@ +'use strict'; + +const entries = require('object.entries'); +const values = require('object.values'); +const Client = require('./client/Client'); + +if (!Object.entries) { + entries.shim(); +} + +if (!Object.values) { + values.shim(); +} + +exports.Client = Client; diff --git a/src/structures/Channel.js b/src/structures/Channel.js new file mode 100644 index 000000000..ae9950c33 --- /dev/null +++ b/src/structures/Channel.js @@ -0,0 +1,16 @@ +'use strict'; + +class Channel { + constructor(client, data) { + this.client = client; + if (data) { + this.setup(data); + } + } + + setup(data) { + this.id = data.id; + } +} + +module.exports = Channel; diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js new file mode 100644 index 000000000..19b84d5b8 --- /dev/null +++ b/src/structures/ClientUser.js @@ -0,0 +1,17 @@ +'use strict'; + +const User = require('./User'); + +class ClientUser extends User { + constructor(client, data) { + super(client, data); + } + + setup(data) { + super.setup(data); + this.verified = data.verified; + this.email = data.email; + } +} + +module.exports = ClientUser; diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js new file mode 100644 index 000000000..0db181e96 --- /dev/null +++ b/src/structures/DMChannel.js @@ -0,0 +1,17 @@ +'use strict'; + +const Channel = require('./Channel'); +const User = require('./User'); + +class DMChannel extends Channel{ + constructor(client, data) { + super(client, data); + } + + setup(data) { + this.recipient = this.client.store.add('users', new User(this.client, data.recipient)); + this.lastMessageID = data.last_message_id; + } +} + +module.exports = DMChannel; diff --git a/src/structures/Guild.js b/src/structures/Guild.js new file mode 100644 index 000000000..f230ad86b --- /dev/null +++ b/src/structures/Guild.js @@ -0,0 +1,91 @@ +'use strict'; + +const User = require('./User'); +const GuildDataStore = require('./datastore/GuildDataStore'); +const TextChannel = require('./TextChannel'); +const VoiceChannel = require('./VoiceChannel'); +const Constants = require('../Util/Constants'); + +class Guild { + constructor(client, data) { + this.client = client; + this.store = new GuildDataStore(); + + if (!data) { + return; + } + + if (data.unavailable) { + this.available = false; + this.id = data.id; + } else { + this.available = true; + this.setup(data); + } + } + + _addMember(guildUser) { + let user = this.client.store.NewUser(guildUser.user); + this.store.memberData[user.id] = { + deaf: guildUser.deaf, + mute: guildUser.mute, + joinDate: new Date(guildUser.joined_at), + roles: guildUser.roles, + }; + if (this.client.ws.emittedReady) { + this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, user); + } + } + + _updateMember(currentUser, newData) { + let oldRoles = this.store.memberData[currentUser.id].roles; + this.store.currentUser[currentUser.id].roles = newData.roles; + if (this.client.ws.emittedReady) { + this.client.emit(Constants.Events.GUILD_MEMBER_ROLES_UPDATE, this, oldRoles, this.store.memberData[currentUser.id].roles); + } + } + + _removeMember(guildUser) { + this.store.remove('members', guildUser); + if (this.client.ws.emittedReady) { + this.client.emit(Constants.Events.GUILD_MEMBER_REMOVE, this, guildUser); + } + } + + setup(data) { + this.id = data.id; + this.available = !data.unavailable; + this.splash = data.splash; + this.region = data.region; + this.ownerID = data.owner_id; + this.name = data.name; + this.memberCount = data.member_count; + this.large = data.large; + this.joinDate = new Date(data.joined_at); + this.icon = data.icon; + this.features = data.features; + this.emojis = data.emojis; + this.afkTimeout = data.afk_timeout; + this.afkChannelID = data.afk_channel_id; + this.embedEnabled = data.embed_enabled; + this.embedChannelID = data.embed_channel_id; + this.verificationLevel = data.verification_level; + this.features = data.features || []; + + if (data.members) { + this.store.clear('members'); + for (let guildUser of data.members) { + this._addMember(guildUser); + } + } + + if (data.channels) { + this.store.clear('channels'); + for (let channel of data.channels) { + this.client.store.NewChannel(channel, this); + } + } + } +} + +module.exports = Guild; diff --git a/src/structures/Message.js b/src/structures/Message.js new file mode 100644 index 000000000..30d7fc4ac --- /dev/null +++ b/src/structures/Message.js @@ -0,0 +1,9 @@ +'use strict'; + +class Message { + constructor() { + + } +} + +module.exports = Message; diff --git a/src/structures/ServerChannel.js b/src/structures/ServerChannel.js new file mode 100644 index 000000000..32294b0ab --- /dev/null +++ b/src/structures/ServerChannel.js @@ -0,0 +1,22 @@ +'use strict'; + +const Channel = require('./Channel'); + +class ServerChannel extends Channel{ + constructor(guild, data) { + super(guild.client, data); + this.guild = guild; + } + + setup(data) { + super.setup(data); + this.type = data.type; + this.topic = data.topic; + this.position = data.position; + this.permissionOverwrites = data.permission_overwrites; + this.name = data.name; + this.lastMessageID = data.last_message_id; + } +} + +module.exports = ServerChannel; diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js new file mode 100644 index 000000000..e8b2b6acc --- /dev/null +++ b/src/structures/TextChannel.js @@ -0,0 +1,13 @@ +'use strict'; + +const ServerChannel = require('./ServerChannel'); +const TextChannelDataStore = require('./datastore/TextChannelDataStore'); + +class TextChannel extends ServerChannel { + constructor(guild, data) { + super(guild, data); + this.store = new TextChannelDataStore(); + } +} + +module.exports = TextChannel; diff --git a/src/structures/User.js b/src/structures/User.js new file mode 100644 index 000000000..50487077f --- /dev/null +++ b/src/structures/User.js @@ -0,0 +1,20 @@ +'use strict'; + +class User { + constructor(client, data) { + this.client = client; + if (data) { + this.setup(data); + } + } + + setup(data) { + this.username = data.username; + this.id = data.id; + this.discriminator = data.discriminator; + this.avatar = data.avatar; + this.bot = Boolean(data.bot); + } +} + +module.exports = User; diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js new file mode 100644 index 000000000..7a69e2b19 --- /dev/null +++ b/src/structures/VoiceChannel.js @@ -0,0 +1,16 @@ +'use strict'; + +const ServerChannel = require('./ServerChannel'); + +class VoiceChannel extends ServerChannel { + constructor(guild, data) { + super(guild, data); + } + + setup(data) { + super.setup(data); + this.bitrate = data.bitrate; + } +} + +module.exports = VoiceChannel; diff --git a/src/structures/datastore/AbstractDataStore.js b/src/structures/datastore/AbstractDataStore.js new file mode 100644 index 000000000..24bfec497 --- /dev/null +++ b/src/structures/datastore/AbstractDataStore.js @@ -0,0 +1,43 @@ +'use strict'; + +class AbstractDataStore{ + constructor() { + this.data = {}; + } + + register(name) { + this.data[name] = {}; + } + + add(location, object) { + if (this.data[location][object.id]) { + return this.data[location][object.id]; + } else { + return this.data[location][object.id] = object; + } + } + + clear(location) { + this.data[location] = {}; + } + + remove(location, object) { + let id = (typeof object === 'string' || object instanceof String) ? object : object.id; + if (this.data[location][id]) { + delete this.data[location][id]; + return true; + } else { + return false; + } + } + + get(location, value) { + return this.data[location][value]; + } + + getAsArray(location) { + return Object.values(this.data[location]); + } +} + +module.exports = AbstractDataStore; diff --git a/src/structures/datastore/ClientDataStore.js b/src/structures/datastore/ClientDataStore.js new file mode 100644 index 000000000..6b9a89488 --- /dev/null +++ b/src/structures/datastore/ClientDataStore.js @@ -0,0 +1,111 @@ +'use strict'; + +const AbstractDataStore = require('./AbstractDataStore'); +const Constants = require('../../util/Constants'); +const CloneObject = require('../../util/CloneObject'); +const Guild = require('../Guild'); +const User = require('../User'); +const DMChannel = require('../DMChannel'); +const TextChannel = require('../TextChannel'); +const VoiceChannel = require('../VoiceChannel'); +const ServerChannel = require('../ServerChannel'); + +class ClientDataStore extends AbstractDataStore{ + constructor(client) { + super(); + + this.client = client; + this.token = null; + this.session = null; + this.user = null; + + this.register('users'); + this.register('guilds'); + this.register('channels'); + } + + get pastReady() { + return this.client.ws.emittedReady; + } + + NewGuild(data) { + let already = this.get('guilds', data.id); + let guild = this.add('guilds', new Guild(this.client, data)); + if (this.pastReady && !already) { + this.client.emit(Constants.Events.GUILD_CREATE, guild); + } + + return guild; + } + + NewUser(data) { + return this.add('users', new User(this.client, data)); + } + + NewChannel(data, guild) { + let already = this.get('channels', data.id); + let channel; + if (data.is_private) { + channel = new DMChannel(this.client, data); + }else { + guild = guild || this.get('guilds', data.guild_id); + if (guild) { + if (data.type === 'text') { + channel = new TextChannel(guild, data); + guild.store.add('channels', channel); + }else if (data.type === 'voice') { + channel = new VoiceChannel(guild, data); + guild.store.add('channels', channel); + } + } + } + + if (channel) { + if (this.pastReady && !already) { + this.client.emit(Constants.Events.CHANNEL_CREATE, channel); + } + + return this.add('channels', channel); + } + } + + KillGuild(guild) { + let already = this.get('guilds', guilds.id); + this.remove('guilds', guild); + if (already && this.pastReady) { + this.client.emit(Constants.Events.GUILD_DELETE, guild); + } + } + + KillUser(user) { + this.remove('users', user); + } + + KillChannel(channel) { + let already = this.get('channels', channel.id); + this.remove('channels', channel); + if (channel instanceof ServerChannel) { + channel.guild.store.remove('channels', channel); + } + + if (already && this.pastReady) { + this.client.emit(Constants.Events.CHANNEL_DELETE, channel); + } + } + + UpdateGuild(currentGuild, newData) { + let oldGuild = CloneObject(currentGuild); + currentGuild.setup(newData); + if (this.pastReady) { + this.client.emit(Constants.Events.GUILD_UPDATE, oldGuild, currentGuild); + } + } + + UpdateChannel(currentChannel, newData) { + let oldChannel = CloneObject(currentChannel); + currentChannel.setup(newData); + this.client.emit(Constants.Events.CHANNEL_UPDATE, oldChannel, currentChannel); + } +} + +module.exports = ClientDataStore; diff --git a/src/structures/datastore/GuildDataStore.js b/src/structures/datastore/GuildDataStore.js new file mode 100644 index 000000000..fc541b33a --- /dev/null +++ b/src/structures/datastore/GuildDataStore.js @@ -0,0 +1,16 @@ +'use strict'; + +const AbstractDataStore = require('./AbstractDataStore'); + +class GuildDataStore extends AbstractDataStore{ + constructor() { + super(); + + this.memberData = {}; + + this.register('members'); + this.register('channels'); + } +} + +module.exports = GuildDataStore; diff --git a/src/structures/datastore/TextChannelDataStore.js b/src/structures/datastore/TextChannelDataStore.js new file mode 100644 index 000000000..08316431b --- /dev/null +++ b/src/structures/datastore/TextChannelDataStore.js @@ -0,0 +1,12 @@ +'use strict'; + +const AbstractDataStore = require('./AbstractDataStore'); + +class TextChannelDataStore extends AbstractDataStore{ + constructor() { + super(); + this.register('messages'); + } +} + +module.exports = TextChannelDataStore; diff --git a/src/util/CloneObject.js b/src/util/CloneObject.js new file mode 100644 index 000000000..158f9d189 --- /dev/null +++ b/src/util/CloneObject.js @@ -0,0 +1,7 @@ +'use strict'; +module.exports = function CloneObject(obj) { + var cloned = Object.create(obj); + Object.assign(cloned, obj); + + return cloned; +}; diff --git a/src/util/Constants.js b/src/util/Constants.js new file mode 100644 index 000000000..5adc1636c --- /dev/null +++ b/src/util/Constants.js @@ -0,0 +1,118 @@ +const DefaultOptions = exports.DefaultOptions = { + ws: { + large_threshold: 250, + compress: true, + properties: { + $os: process ? process.platform : 'discord.js', + $browser: 'discord.js', + $device: 'discord.js', + $referrer: '', + $referring_domain: '', + }, + }, + protocol_version: 4, +}; + +const Package = exports.Package = require('../../package.json'); + +const Errors = exports.Errors = { + NO_TOKEN: new Error('request to use token, but token was unavailable to the client'), + NO_BOT_ACCOUNT: new Error('you should ideally be using a bot account!'), + BAD_WS_MESSAGE: new Error('a bad message was received from the websocket - bad compression or not json'), + TOOK_TOO_LONG: new Error('something took too long to do'), +}; + +const API = 'https://discordapp.com/api'; + +const Endpoints = exports.Endpoints = { + // general endpoints + LOGIN: `${API}/auth/login`, + LOGOUT: `${API}/auth/logout`, + ME: `${API}/users/@me`, + ME_GUILD: (guildID) => `${Endpoints.ME}/guilds/${guildID}`, + GATEWAY: `${API}/gateway`, + USER_CHANNELS: (userID) => `${API}/users/${userID}/channels`, + AVATAR: (userID, avatar) => `${API}/users/${userID}/avatars/${avatar}.jpg`, + INVITE: (id) => `${API}/invite/${id}`, + + // guilds + GUILDS: `${API}/guilds`, + GUILD: (guildID) => `${Endpoints.GUILDS}/${guildID}`, + GUILD_ICON: (guildID, hash) => `${Endpoints.GUILD(guildID)}/icons/${hash}.jpg`, + GUILD_PRUNE: (guildID) => `${Endpoints.GUILD(guildID)}/prune`, + GUILD_EMBED: (guildID) => `${Endpoints.GUILD(guildID)}/embed`, + GUILD_INVITES: (guildID) => `${Endpoints.GUILD(guildID)}/invites`, + GUILD_ROLES: (guildID) => `${Endpoints.GUILD(guildID)}/roles`, + GUILD_BANS: (guildID) => `${Endpoints.GUILD(guildID)}/bans`, + GUILD_INTEGRATIONS: (guildID) => `${Endpoints.GUILD(guildID)}/integrations`, + GUILD_MEMBERS: (guildID) => `${Endpoints.GUILD(guildID)}/members`, + GUILD_CHANNELS: (guildID) => `${Endpoints.GUILD(guildID)}/channels`, + + // channels + CHANNELS: `${API}/channels`, + CHANNEL: (channelID) => `${Endpoints.CHANNELS}/${channelID}`, + CHANNEL_MESSAGES: (channelID) => `${Endpoints.CHANNEL(channelID)}/messages`, + CHANNEL_INVITES: (channelID) => `${Endpoints.CHANNEL(channelID)}/invites`, + CHANNEL_TYPING: (channelID) => `${Endpoints.CHANNEL(channelID)}/typing`, + CHANNEL_PERMISSIONS: (channelID) => `${Endpoints.CHANNEL(channelID)}/permissions`, + CHANNEL_MESSAGE: (channelID, messageID) => `${Endpoints.CHANNEL_MESSAGES(channelID)}/${messageID}`, +}; + +const OPCodes = exports.OPCodes = { + DISPATCH: 0, + HEARTBEAT: 1, + IDENTIFY: 2, + STATUS_UPDATE: 3, + VOICE_STATE_UPDATE: 4, + VOICE_GUILD_PING: 5, + RESUME: 6, + RECONNECT: 7, + REQUEST_GUILD_MEMBERS: 8, + INVALID_SESSION: 9, +}; + +const Events = exports.Events = { + READY: 'ready', + GUILD_CREATE: 'guildCreate', + GUILD_DELETE: 'guildDelete', + GUILD_UNAVAILABLE: 'guildUnavailable', + GUILD_AVAILABLE: 'guildAvailable', + GUILD_UPDATE: 'guildUpdate', + GUILD_BAN_ADD: 'guildBanAdd', + GUILD_BAN_REMOVE: 'guildBanRemove', + GUILD_MEMBER_ADD: 'guildMemberAdd', + GUILD_MEMBER_REMOVE: 'guildMemberRemove', + GUILD_MEMBER_ROLES_UPDATE: 'guildMemberRolesUpdate', + CHANNEL_CREATE: 'channelCreate', + CHANNEL_DELETE: 'channelDelete', + CHANNEL_UPDATE: 'channelUpdate', + WARN: 'warn', +}; + +const WSEvents = exports.WSEvents = { + CHANNEL_CREATE: 'CHANNEL_CREATE', + CHANNEL_DELETE: 'CHANNEL_DELETE', + CHANNEL_UPDATE: 'CHANNEL_UPDATE', + MESSAGE_CREATE: 'MESSAGE_CREATE', + MESSAGE_DELETE: 'MESSAGE_DELETE', + MESSAGE_UPDATE: 'MESSAGE_UPDATE', + PRESENCE_UPDATE: 'PRESENCE_UPDATE', + READY: 'READY', + GUILD_BAN_ADD: 'GUILD_BAN_ADD', + GUILD_BAN_REMOVE: 'GUILD_BAN_REMOVE', + GUILD_CREATE: 'GUILD_CREATE', + GUILD_DELETE: 'GUILD_DELETE', + GUILD_MEMBER_ADD: 'GUILD_MEMBER_ADD', + GUILD_MEMBER_REMOVE: 'GUILD_MEMBER_REMOVE', + GUILD_MEMBER_UPDATE: 'GUILD_MEMBER_UPDATE', + GUILD_MEMBERS_CHUNK: 'GUILD_MEMBERS_CHUNK', + GUILD_ROLE_CREATE: 'GUILD_ROLE_CREATE', + GUILD_ROLE_DELETE: 'GUILD_ROLE_DELETE', + GUILD_ROLE_UPDATE: 'GUILD_ROLE_UPDATE', + GUILD_UPDATE: 'GUILD_UPDATE', + TYPING: 'TYPING_START', + USER_UPDATE: 'USER_UPDATE', + VOICE_STATE_UPDATE: 'VOICE_STATE_UPDATE', + FRIEND_ADD: 'RELATIONSHIP_ADD', + FRIEND_REMOVE: 'RELATIONSHIP_REMOVE', +}; diff --git a/src/util/MergeDefault.js b/src/util/MergeDefault.js new file mode 100644 index 000000000..3da11d278 --- /dev/null +++ b/src/util/MergeDefault.js @@ -0,0 +1,19 @@ +'use strict'; + +module.exports = function merge(def, given) { + if (!given) { + return def; + } + + given = given || {}; + + for (var key in def) { + if (!given.hasOwnProperty(key)) { + given[key] = def[key]; + } else if (given[key] === Object(given[key])) { + given[key] = merge(def[key], given[key]); + } + } + + return given; +}; diff --git a/test/random.js b/test/random.js new file mode 100644 index 000000000..300bc25e9 --- /dev/null +++ b/test/random.js @@ -0,0 +1,39 @@ +'use strict'; + +const Discord = require('../'); + +let client = new Discord.Client(); + +client.login(require('./auth.json').token).then(token => console.log('ready!')).catch(console.log); + +client.on('ready', () => { +}); + +client.on('guildCreate', (guild) => { + console.log(guild); +}); +client.on('guildDelete', (guild) => { + console.log(guild); +}); +client.on('guildUpdate', (old, guild) => { + console.log(old.name, guild.name); +}); +client.on('channelCreate', channel => { + console.log(channel); +}); +client.on('channelDelete', channel => { + console.log(channel); +}); + +client.on('channelUpdate', (old, chan) => { + console.log('chan update', old.name, chan.name); +}); + +client.on('guildMemberAdd', (guild, user) => { + console.log('new guild member', user.username, 'in', guild.name); +}); + +client.on('guildMemberRemove', (guild, user) => { + console.log('dead guild member', user.username, 'in', guild.name); +}); + From ccffe09bca04ff88a1d7ff07d88d64b87d8aa0a6 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sat, 16 Apr 2016 23:01:58 +0100 Subject: [PATCH 002/324] remove unused shim object.entries --- package.json | 1 - src/index.js | 5 ----- 2 files changed, 6 deletions(-) diff --git a/package.json b/package.json index 08a7c794e..b3e6705e3 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "homepage": "https://github.com/hydrabolt/discord.js#readme", "dependencies": { "babel-plugin-transform-runtime": "^6.6.0", - "object.entries": "^1.0.3", "object.values": "^1.0.3", "superagent": "^1.5.0", "unpipe": "^1.0.0", diff --git a/src/index.js b/src/index.js index 1c2103a4c..6dc2c55cb 100644 --- a/src/index.js +++ b/src/index.js @@ -1,13 +1,8 @@ 'use strict'; -const entries = require('object.entries'); const values = require('object.values'); const Client = require('./client/Client'); -if (!Object.entries) { - entries.shim(); -} - if (!Object.values) { values.shim(); } From 30f5e2943a9d496dbe739e125cd4b99cda6ede6c Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sat, 16 Apr 2016 23:24:52 +0100 Subject: [PATCH 003/324] Create Member class, stop storing member data separately and merge into one class with a User --- .../packets/handlers/GuildMemberRemove.js | 8 ++-- .../packets/handlers/GuildMemberUpdate.js | 6 ++- src/structures/Guild.js | 26 +++++------- src/structures/Member.js | 42 +++++++++++++++++++ src/structures/datastore/GuildDataStore.js | 2 - 5 files changed, 62 insertions(+), 22 deletions(-) create mode 100644 src/structures/Member.js diff --git a/src/client/websocket/packets/handlers/GuildMemberRemove.js b/src/client/websocket/packets/handlers/GuildMemberRemove.js index 53a20fa2a..a46556c38 100644 --- a/src/client/websocket/packets/handlers/GuildMemberRemove.js +++ b/src/client/websocket/packets/handlers/GuildMemberRemove.js @@ -21,10 +21,12 @@ class GuildMemberRemoveHandler extends AbstractHandler { let client = this.packetManager.client; let guild = client.store.get('guilds', data.guild_id); - let user = client.store.get('users', data.user.id); - if (guild && user) { - guild._removeMember(user); + if (guild) { + let member = guild.store.get('members', data.user.id); + if (member) { + guild._removeMember(member); + } } } diff --git a/src/client/websocket/packets/handlers/GuildMemberUpdate.js b/src/client/websocket/packets/handlers/GuildMemberUpdate.js index e54daaa8f..20455a216 100644 --- a/src/client/websocket/packets/handlers/GuildMemberUpdate.js +++ b/src/client/websocket/packets/handlers/GuildMemberUpdate.js @@ -21,10 +21,12 @@ class GuildMemberUpdateHandler extends AbstractHandler { let client = this.packetManager.client; let guild = client.store.get('guilds', data.guild_id); - let user = client.store.get('users', data.user.id); if (guild) { - guild._updateMember(user, data); + let member = guild.store.get('members', data.user.id); + if (member) { + guild._updateMember(member, data); + } } } diff --git a/src/structures/Guild.js b/src/structures/Guild.js index f230ad86b..f61b3c259 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -1,6 +1,7 @@ 'use strict'; const User = require('./User'); +const Member = require('./Member'); const GuildDataStore = require('./datastore/GuildDataStore'); const TextChannel = require('./TextChannel'); const VoiceChannel = require('./VoiceChannel'); @@ -25,30 +26,25 @@ class Guild { } _addMember(guildUser) { - let user = this.client.store.NewUser(guildUser.user); - this.store.memberData[user.id] = { - deaf: guildUser.deaf, - mute: guildUser.mute, - joinDate: new Date(guildUser.joined_at), - roles: guildUser.roles, - }; + guildUser.user = this.client.store.NewUser(guildUser.user); + let member = this.store.add('members', new Member(this, guildUser)); if (this.client.ws.emittedReady) { - this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, user); + this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, member); } } - _updateMember(currentUser, newData) { - let oldRoles = this.store.memberData[currentUser.id].roles; - this.store.currentUser[currentUser.id].roles = newData.roles; + _updateMember(member, data) { + let oldRoles = member.roles; + member.roles = data.roles; if (this.client.ws.emittedReady) { - this.client.emit(Constants.Events.GUILD_MEMBER_ROLES_UPDATE, this, oldRoles, this.store.memberData[currentUser.id].roles); + this.client.emit(Constants.Events.GUILD_MEMBER_ROLES_UPDATE, this, oldRoles, member.roles); } } - _removeMember(guildUser) { - this.store.remove('members', guildUser); + _removeMember(guildMember) { + this.store.remove('members', guildMember); if (this.client.ws.emittedReady) { - this.client.emit(Constants.Events.GUILD_MEMBER_REMOVE, this, guildUser); + this.client.emit(Constants.Events.GUILD_MEMBER_REMOVE, this, guildMember); } } diff --git a/src/structures/Member.js b/src/structures/Member.js new file mode 100644 index 000000000..2a39e5481 --- /dev/null +++ b/src/structures/Member.js @@ -0,0 +1,42 @@ +'use strict'; + +class Member { + constructor(guild, data) { + this.client = guild.client; + this.guild = guild; + this._user = {}; + if (data) { + this.setup(data); + } + } + + setup(data) { + this._user = data.user; + this.deaf = data.deaf; + this.mute = data.mute; + this.joinDate = new Date(data.joined_at); + this.roles = data.roles; + } + + get username() { + return this._user.username; + } + + get id() { + return this._user.id; + } + + get discriminator() { + return this._user.discriminator; + } + + get avatar() { + return this._user.avatar; + } + + get bot() { + return this._user.bot; + } +} + +module.exports = Member; diff --git a/src/structures/datastore/GuildDataStore.js b/src/structures/datastore/GuildDataStore.js index fc541b33a..68f8fa5d7 100644 --- a/src/structures/datastore/GuildDataStore.js +++ b/src/structures/datastore/GuildDataStore.js @@ -6,8 +6,6 @@ class GuildDataStore extends AbstractDataStore{ constructor() { super(); - this.memberData = {}; - this.register('members'); this.register('channels'); } From 4de1f4ce991a142851c2888e4cead6fb5af2c0c2 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 17 Apr 2016 15:03:23 +0100 Subject: [PATCH 004/324] Created Role class and permission evaluation within Roles --- src/structures/Guild.js | 12 ++++- src/structures/{Member.js => GuildMember.js} | 4 +- src/structures/Role.js | 52 ++++++++++++++++++++ src/util/Constants.js | 28 +++++++++++ 4 files changed, 92 insertions(+), 4 deletions(-) rename src/structures/{Member.js => GuildMember.js} (91%) create mode 100644 src/structures/Role.js diff --git a/src/structures/Guild.js b/src/structures/Guild.js index f61b3c259..920dc64f7 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -1,11 +1,12 @@ 'use strict'; const User = require('./User'); -const Member = require('./Member'); +const GuildMember = require('./GuildMember'); const GuildDataStore = require('./datastore/GuildDataStore'); const TextChannel = require('./TextChannel'); const VoiceChannel = require('./VoiceChannel'); const Constants = require('../Util/Constants'); +const Role = require('./Role'); class Guild { constructor(client, data) { @@ -27,7 +28,7 @@ class Guild { _addMember(guildUser) { guildUser.user = this.client.store.NewUser(guildUser.user); - let member = this.store.add('members', new Member(this, guildUser)); + let member = this.store.add('members', new GuildMember(this, guildUser)); if (this.client.ws.emittedReady) { this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, member); } @@ -81,6 +82,13 @@ class Guild { this.client.store.NewChannel(channel, this); } } + + if (data.roles) { + this.store.clear('roles'); + for (let role of data.roles) { + this.store.add('roles', new Role(this, role)); + } + }; } } diff --git a/src/structures/Member.js b/src/structures/GuildMember.js similarity index 91% rename from src/structures/Member.js rename to src/structures/GuildMember.js index 2a39e5481..1f6c10187 100644 --- a/src/structures/Member.js +++ b/src/structures/GuildMember.js @@ -1,6 +1,6 @@ 'use strict'; -class Member { +class GuildMember { constructor(guild, data) { this.client = guild.client; this.guild = guild; @@ -39,4 +39,4 @@ class Member { } } -module.exports = Member; +module.exports = GuildMember; diff --git a/src/structures/Role.js b/src/structures/Role.js new file mode 100644 index 000000000..30dc865a3 --- /dev/null +++ b/src/structures/Role.js @@ -0,0 +1,52 @@ +'use strict'; + +const Constants = require('../Util/Constants'); + +class Role { + constructor(guild, data) { + this.guild = guild; + this.client = guild.client; + if (data) { + this.setup(data); + } + } + + setup(data) { + this.id = data.id; + this.name = data.name; + this.color = data.color; + this.hoist = data.hoist; + this.position = data.position; + this.permissions = data.permissions; + this.managed = data.managed; + } + + serialize() { + let serializedPermissions = {}; + for (let permissionName in Constants.PermissionFlags) { + serializedPermissions[permissionName] = this.hasPermission(permissionName); + } + + return serializedPermissions; + } + + hasPermission(permission, explicit) { + if (permission instanceof String || typeof permission === 'string') { + permission = Constants.PermissionFlags[permission]; + } + + if (!permission) { + throw Constants.Errors.NOT_A_PERMISSION; + } + + if (!explicit) { + if ((this.permissions & Constants.PermissionFlags.MANAGE_ROLES) > 0) { + return true; + } + } + + return ((this.permissions & permission) > 0); + } +} + +module.exports = Role; diff --git a/src/util/Constants.js b/src/util/Constants.js index 5adc1636c..674ce7287 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -20,6 +20,7 @@ const Errors = exports.Errors = { NO_BOT_ACCOUNT: new Error('you should ideally be using a bot account!'), BAD_WS_MESSAGE: new Error('a bad message was received from the websocket - bad compression or not json'), TOOK_TOO_LONG: new Error('something took too long to do'), + NOT_A_PERMISSION: new Error('that is not a valid permission number'), }; const API = 'https://discordapp.com/api'; @@ -116,3 +117,30 @@ const WSEvents = exports.WSEvents = { FRIEND_ADD: 'RELATIONSHIP_ADD', FRIEND_REMOVE: 'RELATIONSHIP_REMOVE', }; + +const PermissionFlags = exports.PermissionFlags = { + CREATE_INSTANT_INVITE: 1 << 0, + KICK_MEMBERS: 1 << 1, + BAN_MEMBERS: 1 << 2, + MANAGE_ROLES: 1 << 3, + MANAGE_CHANNELS: 1 << 4, + MANAGE_GUILD: 1 << 5, + + READ_MESSAGES: 1 << 10, + SEND_MESSAGES: 1 << 11, + SEND_TTS_MESSAGES: 1 << 12, + MANAGE_MESSAGES: 1 << 13, + EMBED_LINKS: 1 << 14, + ATTACH_FILES: 1 << 15, + READ_MESSAGE_HISTORY: 1 << 16, + MENTION_EVERYONE: 1 << 17, + + CONNECT: 1 << 20, + SPEAK: 1 << 21, + MUTE_MEMBERS: 1 << 22, + DEAFEN_MEMBERS: 1 << 23, + MOVE_MEMBERS: 1 << 24, + USE_VAD: 1 << 25, +}; + +const DEFAULT_PERMISSIONS = exports.DEFAULT_PERMISSIONS = 36953089; From bbf7be7dfae013c4aff59519e6cb978568cad772 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 17 Apr 2016 15:17:18 +0100 Subject: [PATCH 005/324] Tracking of GUILD_ROLE_CREATE/UPDATE/DELETE events --- .../packets/WebSocketPacketManager.js | 3 ++ .../packets/handlers/GuildRoleCreate.js | 36 +++++++++++++++++++ .../packets/handlers/GuildRoleDelete.js | 34 ++++++++++++++++++ .../packets/handlers/GuildRoleUpdate.js | 36 +++++++++++++++++++ src/util/Constants.js | 3 ++ test/random.js | 11 ++++++ 6 files changed, 123 insertions(+) create mode 100644 src/client/websocket/packets/handlers/GuildRoleCreate.js create mode 100644 src/client/websocket/packets/handlers/GuildRoleDelete.js create mode 100644 src/client/websocket/packets/handlers/GuildRoleUpdate.js diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index cb114bad6..2cf3c2149 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -17,6 +17,9 @@ class WebSocketPacketManager { this.register(Constants.WSEvents.GUILD_MEMBER_ADD, 'GuildMemberAdd'); this.register(Constants.WSEvents.GUILD_MEMBER_REMOVE, 'GuildMemberRemove'); this.register(Constants.WSEvents.GUILD_MEMBER_UPDATE, 'GuildMemberUpdate'); + this.register(Constants.WSEvents.GUILD_ROLE_CREATE, 'GuildRoleCreate'); + this.register(Constants.WSEvents.GUILD_ROLE_DELETE, 'GuildRoleDelete'); + this.register(Constants.WSEvents.GUILD_ROLE_UPDATE, 'GuildRoleUpdate'); this.register(Constants.WSEvents.CHANNEL_CREATE, 'ChannelCreate'); this.register(Constants.WSEvents.CHANNEL_DELETE, 'ChannelDelete'); this.register(Constants.WSEvents.CHANNEL_UPDATE, 'ChannelUpdate'); diff --git a/src/client/websocket/packets/handlers/GuildRoleCreate.js b/src/client/websocket/packets/handlers/GuildRoleCreate.js new file mode 100644 index 000000000..8f8666089 --- /dev/null +++ b/src/client/websocket/packets/handlers/GuildRoleCreate.js @@ -0,0 +1,36 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); +const Constants = require('../../../../util/Constants'); + +const Role = Structure('Role'); +const Guild = Structure('Guild'); + +class GuildRoleCreateHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let guild = client.store.get('guilds', data.guild_id); + + if (guild) { + let already = guild.store.get('roles', data.role.id); + let role = new Role(guild, data.role); + guild.store.add('roles', role); + + if (!already) { + client.emit(Constants.Events.GUILD_ROLE_CREATE, guild, role); + } + } + + } + +}; + +module.exports = GuildRoleCreateHandler; diff --git a/src/client/websocket/packets/handlers/GuildRoleDelete.js b/src/client/websocket/packets/handlers/GuildRoleDelete.js new file mode 100644 index 000000000..002d2321e --- /dev/null +++ b/src/client/websocket/packets/handlers/GuildRoleDelete.js @@ -0,0 +1,34 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); +const Constants = require('../../../../util/Constants'); + +const Role = Structure('Role'); +const Guild = Structure('Guild'); + +class GuildRoleDeleteHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let guild = client.store.get('guilds', data.guild_id); + + if (guild) { + let exists = guild.store.get('roles', data.role_id); + if (exists) { + guild.store.remove('roles', data.role_id); + client.emit(Constants.Events.GUILD_ROLE_DELETE, guild, exists); + } + } + + } + +}; + +module.exports = GuildRoleDeleteHandler; diff --git a/src/client/websocket/packets/handlers/GuildRoleUpdate.js b/src/client/websocket/packets/handlers/GuildRoleUpdate.js new file mode 100644 index 000000000..72799a0ea --- /dev/null +++ b/src/client/websocket/packets/handlers/GuildRoleUpdate.js @@ -0,0 +1,36 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); +const Constants = require('../../../../util/Constants'); +const CloneObject = require('../../../../util/CloneObject'); + +const Role = Structure('Role'); +const Guild = Structure('Guild'); + +class GuildRoleUpdateHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let guild = client.store.get('guilds', data.guild_id); + + if (guild) { + let existingRole = guild.store.get('roles', data.role.id); + if (existingRole) { + let oldRole = CloneObject(existingRole); + existingRole.setup(data.role); + client.emit(Constants.Events.GUILD_ROLE_UPDATE, guild, oldRole, existingRole); + } + } + + } + +}; + +module.exports = GuildRoleUpdateHandler; diff --git a/src/util/Constants.js b/src/util/Constants.js index 674ce7287..ccd415687 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -84,6 +84,9 @@ const Events = exports.Events = { GUILD_MEMBER_ADD: 'guildMemberAdd', GUILD_MEMBER_REMOVE: 'guildMemberRemove', GUILD_MEMBER_ROLES_UPDATE: 'guildMemberRolesUpdate', + GUILD_ROLE_CREATE: 'guildRoleCreate', + GUILD_ROLE_DELETE: 'guildRoleDelete', + GUILD_ROLE_UPDATE: 'guildRoleUpdate', CHANNEL_CREATE: 'channelCreate', CHANNEL_DELETE: 'channelDelete', CHANNEL_UPDATE: 'channelUpdate', diff --git a/test/random.js b/test/random.js index 300bc25e9..5a35bd7a3 100644 --- a/test/random.js +++ b/test/random.js @@ -37,3 +37,14 @@ client.on('guildMemberRemove', (guild, user) => { console.log('dead guild member', user.username, 'in', guild.name); }); +client.on('guildRoleCreate', (guild, role) => { + console.log('new role', role.name, 'in', guild.name); +}); + +client.on('guildRoleDelete', (guild, role) => { + console.log('dead role', role.name, 'in', guild.name); +}); + +client.on('guildRoleUpdate', (guild, old, newRole) => { + console.log('updated role', old.name, 'to', newRole.name, 'in', guild.name); +}); From 71a4cd6a93d5a058c99feb1e2d61d031c2a4c705 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 17 Apr 2016 15:43:12 +0100 Subject: [PATCH 006/324] Added full Role tracking --- src/structures/Guild.js | 3 ++- src/structures/GuildMember.js | 33 +++++++++++++++------------------ test/random.js | 4 ++-- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 920dc64f7..2fb6627a2 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -36,7 +36,8 @@ class Guild { _updateMember(member, data) { let oldRoles = member.roles; - member.roles = data.roles; + + member._roles = data.roles; if (this.client.ws.emittedReady) { this.client.emit(Constants.Events.GUILD_MEMBER_ROLES_UPDATE, this, oldRoles, member.roles); } diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 1f6c10187..560787840 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -4,38 +4,35 @@ class GuildMember { constructor(guild, data) { this.client = guild.client; this.guild = guild; - this._user = {}; + this.user = {}; + this._roles = []; if (data) { this.setup(data); } } setup(data) { - this._user = data.user; + this.user = data.user; this.deaf = data.deaf; this.mute = data.mute; this.joinDate = new Date(data.joined_at); - this.roles = data.roles; + this._roles = data.roles; } - get username() { - return this._user.username; + get roles() { + let list = []; + for (let roleID of this._roles) { + let role = this.guild.store.get('roles', roleID); + if (role) { + list.push(role); + } + } + + return list; } get id() { - return this._user.id; - } - - get discriminator() { - return this._user.discriminator; - } - - get avatar() { - return this._user.avatar; - } - - get bot() { - return this._user.bot; + return this.user.id; } } diff --git a/test/random.js b/test/random.js index 5a35bd7a3..0adff7a8e 100644 --- a/test/random.js +++ b/test/random.js @@ -30,11 +30,11 @@ client.on('channelUpdate', (old, chan) => { }); client.on('guildMemberAdd', (guild, user) => { - console.log('new guild member', user.username, 'in', guild.name); + console.log('new guild member', user.user.username, 'in', guild.name); }); client.on('guildMemberRemove', (guild, user) => { - console.log('dead guild member', user.username, 'in', guild.name); + console.log('dead guild member', user.user.username, 'in', guild.name); }); client.on('guildRoleCreate', (guild, role) => { From abc3f9e2fa8d3e1c788186857bdbffbbdeca4e89 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 17 Apr 2016 18:20:57 +0100 Subject: [PATCH 007/324] Presence tracking --- src/client/websocket/WebSocketManager.js | 1 + .../packets/WebSocketPacketManager.js | 23 ++++++ .../websocket/packets/handlers/GuildDelete.js | 1 + .../packets/handlers/PresenceUpdate.js | 77 +++++++++++++++++++ src/structures/Guild.js | 24 +++++- src/structures/User.js | 2 + src/util/Constants.js | 2 + test/random.js | 4 + 8 files changed, 130 insertions(+), 4 deletions(-) create mode 100644 src/client/websocket/packets/handlers/PresenceUpdate.js diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index ae9b8c550..41c7ea407 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -71,6 +71,7 @@ class WebSocketManager { if (unavailableCount === 0) { this.client.emit(Constants.Events.READY); this.emittedReady = true; + this.packetManager.handleQueue(); } } } diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 2cf3c2149..a64a7bac7 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -2,11 +2,18 @@ const Constants = require('../../../util/Constants'); +const BeforeReadyWhitelist = [ + Constants.WSEvents.READY, + Constants.WSEvents.GUILD_CREATE, + Constants.WSEvents.GUILD_DELETE, +]; + class WebSocketPacketManager { constructor(websocketManager) { this.ws = websocketManager; this.handlers = {}; + this.queue = []; this.register(Constants.WSEvents.READY, 'Ready'); this.register(Constants.WSEvents.GUILD_CREATE, 'GuildCreate'); @@ -23,6 +30,7 @@ class WebSocketPacketManager { this.register(Constants.WSEvents.CHANNEL_CREATE, 'ChannelCreate'); this.register(Constants.WSEvents.CHANNEL_DELETE, 'ChannelDelete'); this.register(Constants.WSEvents.CHANNEL_UPDATE, 'ChannelUpdate'); + this.register(Constants.WSEvents.PRESENCE_UPDATE, 'PresenceUpdate'); } get client() { @@ -34,7 +42,22 @@ class WebSocketPacketManager { this.handlers[event] = new Handler(this); } + handleQueue() { + for (let packetIndex in this.queue) { + this.handle(this.queue[packetIndex]); + this.queue.splice(packetIndex, 1); + } + } + handle(packet) { + + if (!this.ws.emittedReady) { + if (BeforeReadyWhitelist.indexOf(packet.t) === -1) { + this.queue.push(packet); + return; + } + } + if (this.handlers[packet.t]) { return this.handlers[packet.t].handle(packet); } diff --git a/src/client/websocket/packets/handlers/GuildDelete.js b/src/client/websocket/packets/handlers/GuildDelete.js index 550628ac0..350c27b1c 100644 --- a/src/client/websocket/packets/handlers/GuildDelete.js +++ b/src/client/websocket/packets/handlers/GuildDelete.js @@ -28,6 +28,7 @@ class GuildDeleteHandler extends AbstractHandler { } else { // delete guild client.store.KillGuild(guild); + this.packetManager.ws.checkIfReady(); } } else { // it's not there! :( diff --git a/src/client/websocket/packets/handlers/PresenceUpdate.js b/src/client/websocket/packets/handlers/PresenceUpdate.js new file mode 100644 index 000000000..c472a413c --- /dev/null +++ b/src/client/websocket/packets/handlers/PresenceUpdate.js @@ -0,0 +1,77 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); +const Constants = require('../../../../util/Constants'); +const CloneObject = require('../../../../util/CloneObject'); + +const Role = Structure('User'); + +class PresenceUpdateHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + let user = client.store.get('users', data.user.id); + let guild = client.store.get('guilds', data.guild_id); + + function makeUser(user) { + return client.store.NewUser(user); + } + + // step 1 + if (!user) { + if (data.user.username) { + user = makeUser(data.user); + }else { + return; + } + } + + if (guild) { + let memberInGuild = guild.store.get('members', user.id); + if (!memberInGuild) { + let member = guild._addMember({ + user, + roles: data.roles, + deaf: false, + mute: false, + }, true); + client.emit(Constants.Events.GUILD_MEMBER_AVAILABLE, guild, member); + } + } + + data.user.username = data.user.username || user.username; + data.user.id = data.user.id || user.id; + data.user.discriminator = data.user.discriminator || user.discriminator; + data.user.avatar = data.user.avatar || user.avatar; + data.user.status = data.status || user.status; + data.user.game = data.game; + + let same = ( + data.user.username === user.username && + data.user.id === user.id && + data.user.discriminator === user.discriminator && + data.user.avatar === user.avatar && + data.user.status === user.status && + !( + (data.user.game && !user.game) || + (!data.user.game && user.game) || + (data.user.game && user.game && data.user.game.name !== user.game.name) + ) + ); + + if (!same) { + let oldUser = CloneObject(user); + user.setup(data.user); + client.emit(Constants.Events.PRESENCE_UPDATE, oldUser, user); + } + } + +}; + +module.exports = PresenceUpdateHandler; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 2fb6627a2..94b5d82b0 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -26,12 +26,18 @@ class Guild { } } - _addMember(guildUser) { - guildUser.user = this.client.store.NewUser(guildUser.user); + _addMember(guildUser, noEvent) { + if (!(guildUser.user instanceof User)) { + guildUser.user = this.client.store.NewUser(guildUser.user); + } + + guildUser.joined_at = guildUser.joined_at || 0; let member = this.store.add('members', new GuildMember(this, guildUser)); - if (this.client.ws.emittedReady) { + if (this.client.ws.emittedReady && !noEvent) { this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, member); } + + return member; } _updateMember(member, data) { @@ -89,7 +95,17 @@ class Guild { for (let role of data.roles) { this.store.add('roles', new Role(this, role)); } - }; + } + + if (data.presences) { + for (let presence of data.presences) { + let user = this.client.store.get('users', presence.user.id); + if (user) { + user.status = presence.status; + user.game = presence.game; + } + } + } } } diff --git a/src/structures/User.js b/src/structures/User.js index 50487077f..dcab3f561 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -14,6 +14,8 @@ class User { this.discriminator = data.discriminator; this.avatar = data.avatar; this.bot = Boolean(data.bot); + this.status = data.status || 'offline'; + this.game = data.game; } } diff --git a/src/util/Constants.js b/src/util/Constants.js index ccd415687..3f2a8d64c 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -87,9 +87,11 @@ const Events = exports.Events = { GUILD_ROLE_CREATE: 'guildRoleCreate', GUILD_ROLE_DELETE: 'guildRoleDelete', GUILD_ROLE_UPDATE: 'guildRoleUpdate', + GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable', CHANNEL_CREATE: 'channelCreate', CHANNEL_DELETE: 'channelDelete', CHANNEL_UPDATE: 'channelUpdate', + PRESENCE_UPDATE: 'presenceUpdate', WARN: 'warn', }; diff --git a/test/random.js b/test/random.js index 0adff7a8e..569b40b55 100644 --- a/test/random.js +++ b/test/random.js @@ -48,3 +48,7 @@ client.on('guildRoleDelete', (guild, role) => { client.on('guildRoleUpdate', (guild, old, newRole) => { console.log('updated role', old.name, 'to', newRole.name, 'in', guild.name); }); + +client.on('presenceUpdate', (oldUser, newUser) => { + console.log('presence from', oldUser.username, 'to', newUser.username); +}); From 685d7b622c604cb9ea5409d9bee4e2be86dae81d Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 17 Apr 2016 18:37:15 +0100 Subject: [PATCH 008/324] Fix READY bug when logging in with email/password, add UserUpdate packet handler --- .../packets/WebSocketPacketManager.js | 5 ++- .../websocket/packets/handlers/Ready.js | 3 +- .../websocket/packets/handlers/UserUpdate.js | 42 +++++++++++++++++++ src/util/Constants.js | 1 + test/random.js | 2 +- 5 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 src/client/websocket/packets/handlers/UserUpdate.js diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index a64a7bac7..bb9ef601e 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -8,6 +8,8 @@ const BeforeReadyWhitelist = [ Constants.WSEvents.GUILD_DELETE, ]; +var amount = 0; + class WebSocketPacketManager { constructor(websocketManager) { @@ -31,6 +33,7 @@ class WebSocketPacketManager { this.register(Constants.WSEvents.CHANNEL_DELETE, 'ChannelDelete'); this.register(Constants.WSEvents.CHANNEL_UPDATE, 'ChannelUpdate'); this.register(Constants.WSEvents.PRESENCE_UPDATE, 'PresenceUpdate'); + this.register(Constants.WSEvents.USER_UPDATE, 'UserUpdate'); } get client() { @@ -50,7 +53,7 @@ class WebSocketPacketManager { } handle(packet) { - + amount++; if (!this.ws.emittedReady) { if (BeforeReadyWhitelist.indexOf(packet.t) === -1) { this.queue.push(packet); diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index cd512a5e8..b5bd514f3 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -16,7 +16,6 @@ class ReadyHandler extends AbstractHandler { handle(packet) { let data = packet.d; let client = this.packetManager.client; - client.manager.setupKeepAlive(data.heartbeat_interval); client.store.user = client.store.add('users', new ClientUser(client, data.user)); @@ -29,6 +28,8 @@ class ReadyHandler extends AbstractHandler { client.store.NewChannel(privateDM); } + this.packetManager.ws.checkIfReady(); + } }; diff --git a/src/client/websocket/packets/handlers/UserUpdate.js b/src/client/websocket/packets/handlers/UserUpdate.js new file mode 100644 index 000000000..d8bc1f7cc --- /dev/null +++ b/src/client/websocket/packets/handlers/UserUpdate.js @@ -0,0 +1,42 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); +const CloneObject = name => require(`../../../../util/CloneObject`); + +const ClientUser = Structure('ClientUser'); +const Guild = Structure('Guild'); +const DMChannel = Structure('DMChannel'); + +class UserUpdateHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let user = client.store.user; + + if (!user) { + return; + } + + let oldUser = CloneObject(user); + + user.username = data.username || user.username; + user.id = data.id || user.id; + user.avatar = data.avatar || user.avatar; + user.discriminator = data.discriminator || user.discriminator; + user.email = data.email || user.email; + user.verified = data.verified || user.verified; + + client.emit(Constants.Events.USER_UPDATE, oldUser, user); + + } + +}; + +module.exports = UserUpdateHandler; diff --git a/src/util/Constants.js b/src/util/Constants.js index 3f2a8d64c..81511b072 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -92,6 +92,7 @@ const Events = exports.Events = { CHANNEL_DELETE: 'channelDelete', CHANNEL_UPDATE: 'channelUpdate', PRESENCE_UPDATE: 'presenceUpdate', + USER_UPDATE: 'userUpdate', WARN: 'warn', }; diff --git a/test/random.js b/test/random.js index 569b40b55..fd54e734b 100644 --- a/test/random.js +++ b/test/random.js @@ -50,5 +50,5 @@ client.on('guildRoleUpdate', (guild, old, newRole) => { }); client.on('presenceUpdate', (oldUser, newUser) => { - console.log('presence from', oldUser.username, 'to', newUser.username); + // console.log('presence from', oldUser.username, 'to', newUser.username); }); From d1d13f5c85d89d3c3507a25887673d7655410543 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 17 Apr 2016 19:12:29 +0100 Subject: [PATCH 009/324] Added VoiceStateUpdate handler and DataStore for VoiceChannels. Also added toString methods to Guilds, DMChannels, ServerChannels and Users. --- .../packets/WebSocketPacketManager.js | 1 + .../packets/handlers/VoiceStateUpdate.js | 43 +++++++++++++++++++ src/structures/DMChannel.js | 4 ++ src/structures/Guild.js | 18 ++++++++ src/structures/GuildMember.js | 20 ++++++++- src/structures/ServerChannel.js | 4 ++ src/structures/User.js | 4 ++ src/structures/VoiceChannel.js | 2 + .../datastore/VoiceChannelDataStore.js | 12 ++++++ src/util/Constants.js | 1 + test/random.js | 4 ++ 11 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 src/client/websocket/packets/handlers/VoiceStateUpdate.js create mode 100644 src/structures/datastore/VoiceChannelDataStore.js diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index bb9ef601e..e23eabf8b 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -34,6 +34,7 @@ class WebSocketPacketManager { this.register(Constants.WSEvents.CHANNEL_UPDATE, 'ChannelUpdate'); this.register(Constants.WSEvents.PRESENCE_UPDATE, 'PresenceUpdate'); this.register(Constants.WSEvents.USER_UPDATE, 'UserUpdate'); + this.register(Constants.WSEvents.VOICE_STATE_UPDATE, 'VoiceStateUpdate'); } get client() { diff --git a/src/client/websocket/packets/handlers/VoiceStateUpdate.js b/src/client/websocket/packets/handlers/VoiceStateUpdate.js new file mode 100644 index 000000000..3838b7007 --- /dev/null +++ b/src/client/websocket/packets/handlers/VoiceStateUpdate.js @@ -0,0 +1,43 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); +const Constants = require('../../../../util/Constants'); +const CloneObject = require('../../../../util/CloneObject'); + +const Role = Structure('User'); + +class VoiceStateUpdateHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + let guild = client.store.get('guilds', data.guild_id); + + if (guild) { + let member = guild.store.get('members', data.user_id); + let channel = guild.store.get('channels', data.channel_id); + if (member) { + let oldVoiceChannelMember = CloneObject(member); + if (member.voiceChannel && member.voiceChannel.id !== data.channel_id) { + member.voiceChannel.store.remove('members', oldVoiceChannelMember); + } + + member.serverMute = data.mute; + member.serverDeaf = data.deaf; + member.selfMute = data.self_mute; + member.selfDeaf = data.self_deaf; + member.voiceSessionID = data.session_id; + member.voiceChannelID = data.channel_id; + client.emit(Constants.Events.VOICE_STATE_UPDATE, oldVoiceChannelMember, member); + } + } + } + +}; + +module.exports = VoiceStateUpdateHandler; diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 0db181e96..7333ac8e7 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -12,6 +12,10 @@ class DMChannel extends Channel{ this.recipient = this.client.store.add('users', new User(this.client, data.recipient)); this.lastMessageID = data.last_message_id; } + + toString() { + return this.recipient.toString(); + } } module.exports = DMChannel; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 94b5d82b0..f6fb90a00 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -56,6 +56,10 @@ class Guild { } } + toString() { + return this.name; + } + setup(data) { this.id = data.id; this.available = !data.unavailable; @@ -106,6 +110,20 @@ class Guild { } } } + + if (data.voice_states) { + for (let voiceState of data.voice_states) { + let member = this.store.get('members', voiceState.user_id); + if (member) { + member.serverMute = voiceState.mute; + member.serverDeaf = voiceState.deaf; + member.selfMute = voiceState.self_mute; + member.selfDeaf = voiceState.self_deaf; + member.voiceSessionID = voiceState.session_id; + member.voiceChannelID = voiceState.channel_id; + } + } + } } } diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 560787840..e8b531db0 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -13,8 +13,12 @@ class GuildMember { setup(data) { this.user = data.user; - this.deaf = data.deaf; - this.mute = data.mute; + this.serverDeaf = data.deaf; + this.serverMute = data.mute; + this.selfMute = data.self_mute; + this.selfDeaf = data.self_deaf; + this.voiceSessionID = data.session_id; + this.voiceChannelID = data.channel_id; this.joinDate = new Date(data.joined_at); this._roles = data.roles; } @@ -31,6 +35,18 @@ class GuildMember { return list; } + get mute() { + return this.selfMute || this.serverMute; + } + + get deaf() { + return this.selfDeaf || this.serverDeaf; + } + + get voiceChannel() { + return this.guild.store.get('channels', this.voiceChannelID); + } + get id() { return this.user.id; } diff --git a/src/structures/ServerChannel.js b/src/structures/ServerChannel.js index 32294b0ab..58053250a 100644 --- a/src/structures/ServerChannel.js +++ b/src/structures/ServerChannel.js @@ -17,6 +17,10 @@ class ServerChannel extends Channel{ this.name = data.name; this.lastMessageID = data.last_message_id; } + + toString() { + return this.name; + } } module.exports = ServerChannel; diff --git a/src/structures/User.js b/src/structures/User.js index dcab3f561..6cae4518b 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -17,6 +17,10 @@ class User { this.status = data.status || 'offline'; this.game = data.game; } + + toString() { + return `<@${this.id}>`; + } } module.exports = User; diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index 7a69e2b19..fb54df361 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -1,10 +1,12 @@ 'use strict'; const ServerChannel = require('./ServerChannel'); +const VoiceChannelDataStore = require('./datastore/VoiceChannelDataStore'); class VoiceChannel extends ServerChannel { constructor(guild, data) { super(guild, data); + this.store = new VoiceChannelDataStore(); } setup(data) { diff --git a/src/structures/datastore/VoiceChannelDataStore.js b/src/structures/datastore/VoiceChannelDataStore.js new file mode 100644 index 000000000..88b9da7bb --- /dev/null +++ b/src/structures/datastore/VoiceChannelDataStore.js @@ -0,0 +1,12 @@ +'use strict'; + +const AbstractDataStore = require('./AbstractDataStore'); + +class VoiceChannelDataStore extends AbstractDataStore{ + constructor() { + super(); + this.register('members'); + } +} + +module.exports = VoiceChannelDataStore; diff --git a/src/util/Constants.js b/src/util/Constants.js index 81511b072..86fe01556 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -93,6 +93,7 @@ const Events = exports.Events = { CHANNEL_UPDATE: 'channelUpdate', PRESENCE_UPDATE: 'presenceUpdate', USER_UPDATE: 'userUpdate', + VOICE_STATE_UPDATE: 'voiceStateUpdate', WARN: 'warn', }; diff --git a/test/random.js b/test/random.js index fd54e734b..ec4003d72 100644 --- a/test/random.js +++ b/test/random.js @@ -52,3 +52,7 @@ client.on('guildRoleUpdate', (guild, old, newRole) => { client.on('presenceUpdate', (oldUser, newUser) => { // console.log('presence from', oldUser.username, 'to', newUser.username); }); + +client.on('voiceStateUpdate', (oldMember, newMember) => { + console.log('voiceState', oldMember.user.username, oldMember.voiceChannel + '', newMember.voiceChannel + ''); +}); From ce2cf382b3d755f8a145ed6d4751321a6bd5a648 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Mon, 18 Apr 2016 16:39:57 +0100 Subject: [PATCH 010/324] TypingStart handler --- .../packets/WebSocketPacketManager.js | 1 + .../websocket/packets/handlers/TypingStart.js | 62 +++++++++++++++++++ src/structures/Channel.js | 2 + src/util/Constants.js | 4 +- test/random.js | 10 +++ 5 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 src/client/websocket/packets/handlers/TypingStart.js diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index e23eabf8b..48c2dd3fa 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -35,6 +35,7 @@ class WebSocketPacketManager { this.register(Constants.WSEvents.PRESENCE_UPDATE, 'PresenceUpdate'); this.register(Constants.WSEvents.USER_UPDATE, 'UserUpdate'); this.register(Constants.WSEvents.VOICE_STATE_UPDATE, 'VoiceStateUpdate'); + this.register(Constants.WSEvents.TYPING_START, 'TypingStart'); } get client() { diff --git a/src/client/websocket/packets/handlers/TypingStart.js b/src/client/websocket/packets/handlers/TypingStart.js new file mode 100644 index 000000000..5fdbf598f --- /dev/null +++ b/src/client/websocket/packets/handlers/TypingStart.js @@ -0,0 +1,62 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); +const Constants = require('../../../../util/Constants'); +const CloneObject = require('../../../../util/CloneObject'); + +const Role = Structure('User'); + +class TypingData { + constructor(since, lastTimestamp, _timeout) { + this.since = since; + this.lastTimestamp = lastTimestamp; + this._timeout = _timeout; + } + + resetTimeout(_timeout) { + clearTimeout(this._timeout); + this._timeout = _timeout; + } + + get elapsedTime() { + return Date.now() - this.since; + } +} + +class TypingStartHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + let channel = client.store.get('channels', data.channel_id); + let user = client.store.get('users', data.user_id); + let timestamp = new Date(data.timestamp * 1000); + + if (channel && user) { + if (channel.typingMap[user.id]) { + // already typing, renew + let mapping = channel.typingMap[user.id]; + mapping.lastTimestamp = timestamp; + mapping.resetTimeout(tooLate()); + } else { + channel.typingMap[user.id] = new TypingData(timestamp, timestamp, tooLate()); + client.emit(Constants.Events.TYPING_START, channel, user); + } + } + + function tooLate() { + return setTimeout(() => { + client.emit(Constants.Events.TYPING_STOP, channel, user, channel.typingMap[user.id]); + delete channel.typingMap[user.id]; + }, 6000); + } + } + +}; + +module.exports = TypingStartHandler; diff --git a/src/structures/Channel.js b/src/structures/Channel.js index ae9950c33..245a17a09 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -3,6 +3,8 @@ class Channel { constructor(client, data) { this.client = client; + this.typingMap = {}; + this.typingTimeouts = []; if (data) { this.setup(data); } diff --git a/src/util/Constants.js b/src/util/Constants.js index 86fe01556..1449147fe 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -94,6 +94,8 @@ const Events = exports.Events = { PRESENCE_UPDATE: 'presenceUpdate', USER_UPDATE: 'userUpdate', VOICE_STATE_UPDATE: 'voiceStateUpdate', + TYPING_START: 'typingStart', + TYPING_STOP: 'typingStop', WARN: 'warn', }; @@ -118,7 +120,7 @@ const WSEvents = exports.WSEvents = { GUILD_ROLE_DELETE: 'GUILD_ROLE_DELETE', GUILD_ROLE_UPDATE: 'GUILD_ROLE_UPDATE', GUILD_UPDATE: 'GUILD_UPDATE', - TYPING: 'TYPING_START', + TYPING_START: 'TYPING_START', USER_UPDATE: 'USER_UPDATE', VOICE_STATE_UPDATE: 'VOICE_STATE_UPDATE', FRIEND_ADD: 'RELATIONSHIP_ADD', diff --git a/test/random.js b/test/random.js index ec4003d72..d47034116 100644 --- a/test/random.js +++ b/test/random.js @@ -56,3 +56,13 @@ client.on('presenceUpdate', (oldUser, newUser) => { client.on('voiceStateUpdate', (oldMember, newMember) => { console.log('voiceState', oldMember.user.username, oldMember.voiceChannel + '', newMember.voiceChannel + ''); }); + +client.on('typingStart', (channel, user) => { + if (user.username === 'hydrabolt') + console.log(user.username, 'started typing in', channel.name); +}); + +client.on('typingStop', (channel, user, data) => { + if (user.username === 'hydrabolt') + console.log(user.username, 'stopped typing in', channel.name, 'after', data.elapsedTime + 'ms'); +}); From c36cc3b551fcec1eb96615f833971dcd842d1d7b Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Mon, 18 Apr 2016 16:54:14 +0100 Subject: [PATCH 011/324] Added GuildMembersChunk handler; untested --- .../packets/WebSocketPacketManager.js | 1 + .../packets/handlers/GuildMembersChunk.js | 33 +++++++++++++++++++ .../websocket/packets/handlers/TypingStart.js | 2 -- src/util/Constants.js | 1 + 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 src/client/websocket/packets/handlers/GuildMembersChunk.js diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 48c2dd3fa..43d6b1249 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -29,6 +29,7 @@ class WebSocketPacketManager { this.register(Constants.WSEvents.GUILD_ROLE_CREATE, 'GuildRoleCreate'); this.register(Constants.WSEvents.GUILD_ROLE_DELETE, 'GuildRoleDelete'); this.register(Constants.WSEvents.GUILD_ROLE_UPDATE, 'GuildRoleUpdate'); + this.register(Constants.WSEvents.GUILD_MEMBERS_CHUNK, 'GuildMembersChunk'); this.register(Constants.WSEvents.CHANNEL_CREATE, 'ChannelCreate'); this.register(Constants.WSEvents.CHANNEL_DELETE, 'ChannelDelete'); this.register(Constants.WSEvents.CHANNEL_UPDATE, 'ChannelUpdate'); diff --git a/src/client/websocket/packets/handlers/GuildMembersChunk.js b/src/client/websocket/packets/handlers/GuildMembersChunk.js new file mode 100644 index 000000000..3cd2ba516 --- /dev/null +++ b/src/client/websocket/packets/handlers/GuildMembersChunk.js @@ -0,0 +1,33 @@ +'use strict'; + +// ##untested## + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); +const Constants = require('../../../../util/Constants'); +const CloneObject = require('../../../../util/CloneObject'); + +class GuildMembersChunkHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + let guild = client.store.get('guilds', data.guild_id); + + let members = []; + if (guild) { + for (let member of guild.members) { + members.push(guild._addMember(member, true)); + } + } + + client.emit(Constants.Events.GUILD_MEMBERS_CHUNK, guild, members); + } + +}; + +module.exports = GuildMembersChunkHandler; diff --git a/src/client/websocket/packets/handlers/TypingStart.js b/src/client/websocket/packets/handlers/TypingStart.js index 5fdbf598f..c64ff705a 100644 --- a/src/client/websocket/packets/handlers/TypingStart.js +++ b/src/client/websocket/packets/handlers/TypingStart.js @@ -5,8 +5,6 @@ const Structure = name => require(`../../../../structures/${name}`); const Constants = require('../../../../util/Constants'); const CloneObject = require('../../../../util/CloneObject'); -const Role = Structure('User'); - class TypingData { constructor(since, lastTimestamp, _timeout) { this.since = since; diff --git a/src/util/Constants.js b/src/util/Constants.js index 1449147fe..74666d589 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -97,6 +97,7 @@ const Events = exports.Events = { TYPING_START: 'typingStart', TYPING_STOP: 'typingStop', WARN: 'warn', + GUILD_MEMBERS_CHUNK: 'guildMembersChunk', }; const WSEvents = exports.WSEvents = { From 7f4751e7c4369c6ad1cc571cdf30527ee571c01e Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Mon, 18 Apr 2016 17:23:37 +0100 Subject: [PATCH 012/324] add PermissionOverwrites class in preparation for permission evaluation --- src/structures/Channel.js | 6 +++++- src/structures/PermissionOverwrites.js | 19 +++++++++++++++++++ src/structures/ServerChannel.js | 12 +++++++++--- test/random.js | 4 ++-- 4 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 src/structures/PermissionOverwrites.js diff --git a/src/structures/Channel.js b/src/structures/Channel.js index 245a17a09..8dc22316f 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -1,10 +1,14 @@ 'use strict'; class Channel { - constructor(client, data) { + constructor(client, data, guild) { this.client = client; this.typingMap = {}; this.typingTimeouts = []; + if (guild) { + this.guild = guild; + } + if (data) { this.setup(data); } diff --git a/src/structures/PermissionOverwrites.js b/src/structures/PermissionOverwrites.js new file mode 100644 index 000000000..717c94d46 --- /dev/null +++ b/src/structures/PermissionOverwrites.js @@ -0,0 +1,19 @@ +'use strict'; + +class PermissionOverwrites { + constructor(serverChannel, data) { + this.channel = serverChannel; + if (data) { + this.setup(data); + } + } + + setup(data) { + this.type = data.type; + this.id = data.id; + this.denyData = data.deny; + this.allowData = data.allow; + } +} + +module.exports = PermissionOverwrites; diff --git a/src/structures/ServerChannel.js b/src/structures/ServerChannel.js index 58053250a..9be3bd58a 100644 --- a/src/structures/ServerChannel.js +++ b/src/structures/ServerChannel.js @@ -1,11 +1,11 @@ 'use strict'; const Channel = require('./Channel'); +const PermissionOverwrites = require('./PermissionOverwrites'); class ServerChannel extends Channel{ constructor(guild, data) { - super(guild.client, data); - this.guild = guild; + super(guild.client, data, guild); } setup(data) { @@ -13,9 +13,15 @@ class ServerChannel extends Channel{ this.type = data.type; this.topic = data.topic; this.position = data.position; - this.permissionOverwrites = data.permission_overwrites; this.name = data.name; this.lastMessageID = data.last_message_id; + + if (data.permission_overwrites) { + this.permissionOverwrites = []; + for (let overwrite of data.permission_overwrites) { + this.permissionOverwrites.push(new PermissionOverwrites(this, overwrite)); + } + } } toString() { diff --git a/test/random.js b/test/random.js index d47034116..22a216aa4 100644 --- a/test/random.js +++ b/test/random.js @@ -57,12 +57,12 @@ client.on('voiceStateUpdate', (oldMember, newMember) => { console.log('voiceState', oldMember.user.username, oldMember.voiceChannel + '', newMember.voiceChannel + ''); }); -client.on('typingStart', (channel, user) => { +client.on('typingStart.', (channel, user) => { if (user.username === 'hydrabolt') console.log(user.username, 'started typing in', channel.name); }); -client.on('typingStop', (channel, user, data) => { +client.on('typingStop.', (channel, user, data) => { if (user.username === 'hydrabolt') console.log(user.username, 'stopped typing in', channel.name, 'after', data.elapsedTime + 'ms'); }); From c947e172d65424fa10d02988cea1826a7d07540f Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Mon, 18 Apr 2016 17:55:21 +0100 Subject: [PATCH 013/324] Add MessageCreate handler, set up Message class and add ability to Cache messages --- .../packets/WebSocketPacketManager.js | 1 + .../packets/handlers/MessageCreate.js | 31 +++++++++++++++++++ src/structures/DMChannel.js | 16 ++++++++++ src/structures/Message.js | 25 ++++++++++++++- src/structures/TextChannel.js | 15 +++++++++ src/util/Constants.js | 2 ++ test/random.js | 4 +++ 7 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 src/client/websocket/packets/handlers/MessageCreate.js diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 43d6b1249..d3c2d0ca6 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -37,6 +37,7 @@ class WebSocketPacketManager { this.register(Constants.WSEvents.USER_UPDATE, 'UserUpdate'); this.register(Constants.WSEvents.VOICE_STATE_UPDATE, 'VoiceStateUpdate'); this.register(Constants.WSEvents.TYPING_START, 'TypingStart'); + this.register(Constants.WSEvents.MESSAGE_CREATE, 'MessageCreate'); } get client() { diff --git a/src/client/websocket/packets/handlers/MessageCreate.js b/src/client/websocket/packets/handlers/MessageCreate.js new file mode 100644 index 000000000..f6e2cf35e --- /dev/null +++ b/src/client/websocket/packets/handlers/MessageCreate.js @@ -0,0 +1,31 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); +const Constants = require('../../../../util/Constants'); + +const Message = Structure('Message'); +const Guild = Structure('Guild'); + +class MessageCreateHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + let channel = client.store.get('channels', data.channel_id); + + if (channel) { + let message = new Message(channel, data); + channel._cacheMessage(message); + client.emit(Constants.Events.MESSAGE_CREATE, message); + } + + } + +}; + +module.exports = MessageCreateHandler; diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 7333ac8e7..b1bdd92c7 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -2,10 +2,26 @@ const Channel = require('./Channel'); const User = require('./User'); +const TextChannelDataStore = require('./datastore/TextChannelDataStore'); class DMChannel extends Channel{ constructor(client, data) { super(client, data); + this.store = new TextChannelDataStore(); + } + + _cacheMessage(message) { + let maxSize = this.client.options.max_message_cache; + if (maxSize === 0) { + // saves on performance + return; + } + + let storeKeys = Object.keys(this.store); + if (storeKeys.length >= maxSize) { + this.store.remove(storeKeys[0]); + this.store.add('messages', message); + } } setup(data) { diff --git a/src/structures/Message.js b/src/structures/Message.js index 30d7fc4ac..1da8cf9bc 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -1,8 +1,31 @@ 'use strict'; class Message { - constructor() { + constructor(serverChannel, data) { + this.channel = serverChannel; + this.guild = serverChannel.guild; + if (data) { + this.setup(data); + } + } + setup(data) { + this.author = this.guild.client.store.get('users', data.author.id); + this.content = data.content; + this.timestamp = new Date(data.timestamp); + this.editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp) : null; + this.tts = data.tts; + this.mentionEveryone = data.mention_everyone; + this.nonce = data.nonce; + this.embeds = data.embeds; + this.attachments = data.attachments; + this.mentions = []; + for (let mention of data.mentions) { + let user = this.guild.client.store.get('users', mention.id); + if (user) { + this.mentions.push(user); + } + } } } diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index e8b2b6acc..c9ae55f06 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -4,10 +4,25 @@ const ServerChannel = require('./ServerChannel'); const TextChannelDataStore = require('./datastore/TextChannelDataStore'); class TextChannel extends ServerChannel { + constructor(guild, data) { super(guild, data); this.store = new TextChannelDataStore(); } + + _cacheMessage(message) { + let maxSize = this.client.options.max_message_cache; + if (maxSize === 0) { + // saves on performance + return; + } + + let storeKeys = Object.keys(this.store); + if (storeKeys.length >= maxSize) { + this.store.remove(storeKeys[0]); + this.store.add('messages', message); + } + } } module.exports = TextChannel; diff --git a/src/util/Constants.js b/src/util/Constants.js index 74666d589..abbf2c6a2 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -11,6 +11,7 @@ const DefaultOptions = exports.DefaultOptions = { }, }, protocol_version: 4, + max_message_cache: 20, }; const Package = exports.Package = require('../../package.json'); @@ -98,6 +99,7 @@ const Events = exports.Events = { TYPING_STOP: 'typingStop', WARN: 'warn', GUILD_MEMBERS_CHUNK: 'guildMembersChunk', + MESSAGE_CREATE: 'message', }; const WSEvents = exports.WSEvents = { diff --git a/test/random.js b/test/random.js index 22a216aa4..f8df05a74 100644 --- a/test/random.js +++ b/test/random.js @@ -66,3 +66,7 @@ client.on('typingStop.', (channel, user, data) => { if (user.username === 'hydrabolt') console.log(user.username, 'stopped typing in', channel.name, 'after', data.elapsedTime + 'ms'); }); + +client.on('message', message => { + console.log(message.author.username, 'said', message.content, 'in', message.channel.name); +}); From d437fd31cf64400284dec5b8b44fc42de0979c82 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Mon, 18 Apr 2016 18:06:31 +0100 Subject: [PATCH 014/324] MessageDelete handling --- .../packets/WebSocketPacketManager.js | 1 + .../packets/handlers/MessageDelete.js | 32 +++++++++++++++++++ src/structures/DMChannel.js | 3 +- src/structures/Message.js | 1 + src/structures/TextChannel.js | 3 +- src/util/Constants.js | 1 + test/random.js | 5 +++ 7 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 src/client/websocket/packets/handlers/MessageDelete.js diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index d3c2d0ca6..1cfeb9362 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -38,6 +38,7 @@ class WebSocketPacketManager { this.register(Constants.WSEvents.VOICE_STATE_UPDATE, 'VoiceStateUpdate'); this.register(Constants.WSEvents.TYPING_START, 'TypingStart'); this.register(Constants.WSEvents.MESSAGE_CREATE, 'MessageCreate'); + this.register(Constants.WSEvents.MESSAGE_DELETE, 'MessageDelete'); } get client() { diff --git a/src/client/websocket/packets/handlers/MessageDelete.js b/src/client/websocket/packets/handlers/MessageDelete.js new file mode 100644 index 000000000..43944fcbc --- /dev/null +++ b/src/client/websocket/packets/handlers/MessageDelete.js @@ -0,0 +1,32 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); +const Constants = require('../../../../util/Constants'); + +const Message = Structure('Message'); +const Guild = Structure('Guild'); + +class MessageDeleteHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + let channel = client.store.get('channels', data.channel_id); + if (channel) { + let message = channel.store.get('messages', data.id); + if (message) { + channel.store.remove('messages', message.id); + client.emit(Constants.Events.MESSAGE_DELETE, message); + } + } + + } + +}; + +module.exports = MessageDeleteHandler; diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index b1bdd92c7..f755c3b87 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -20,8 +20,9 @@ class DMChannel extends Channel{ let storeKeys = Object.keys(this.store); if (storeKeys.length >= maxSize) { this.store.remove(storeKeys[0]); - this.store.add('messages', message); } + + this.store.add('messages', message); } setup(data) { diff --git a/src/structures/Message.js b/src/structures/Message.js index 1da8cf9bc..8f600f929 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -20,6 +20,7 @@ class Message { this.embeds = data.embeds; this.attachments = data.attachments; this.mentions = []; + this.id = data.id; for (let mention of data.mentions) { let user = this.guild.client.store.get('users', mention.id); if (user) { diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index c9ae55f06..eac0f45f6 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -20,8 +20,9 @@ class TextChannel extends ServerChannel { let storeKeys = Object.keys(this.store); if (storeKeys.length >= maxSize) { this.store.remove(storeKeys[0]); - this.store.add('messages', message); } + + this.store.add('messages', message); } } diff --git a/src/util/Constants.js b/src/util/Constants.js index abbf2c6a2..ad5713e18 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -100,6 +100,7 @@ const Events = exports.Events = { WARN: 'warn', GUILD_MEMBERS_CHUNK: 'guildMembersChunk', MESSAGE_CREATE: 'message', + MESSAGE_DELETE: 'messageDelete', }; const WSEvents = exports.WSEvents = { diff --git a/test/random.js b/test/random.js index f8df05a74..54fde3c24 100644 --- a/test/random.js +++ b/test/random.js @@ -68,5 +68,10 @@ client.on('typingStop.', (channel, user, data) => { }); client.on('message', message => { + if (message.author.username === 'hydrabolt') console.log(message.author.username, 'said', message.content, 'in', message.channel.name); }); + +client.on('messageDelete', message => { + console.log('Message deleted by', message.author.username); +}); From 00327a577690cdbcc7e4a8d591cf3d8559a88d93 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Mon, 18 Apr 2016 18:12:57 +0100 Subject: [PATCH 015/324] Add MessageUpdate handling --- .../packets/WebSocketPacketManager.js | 1 + .../packets/handlers/MessageUpdate.js | 35 +++++++++++++++++++ src/structures/Message.js | 32 +++++++++++++++++ src/util/Constants.js | 3 +- test/random.js | 5 +++ 5 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 src/client/websocket/packets/handlers/MessageUpdate.js diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 1cfeb9362..8e0341757 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -39,6 +39,7 @@ class WebSocketPacketManager { this.register(Constants.WSEvents.TYPING_START, 'TypingStart'); this.register(Constants.WSEvents.MESSAGE_CREATE, 'MessageCreate'); this.register(Constants.WSEvents.MESSAGE_DELETE, 'MessageDelete'); + this.register(Constants.WSEvents.MESSAGE_UPDATE, 'MessageUpdate'); } get client() { diff --git a/src/client/websocket/packets/handlers/MessageUpdate.js b/src/client/websocket/packets/handlers/MessageUpdate.js new file mode 100644 index 000000000..e6daf2bbc --- /dev/null +++ b/src/client/websocket/packets/handlers/MessageUpdate.js @@ -0,0 +1,35 @@ +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); +const Constants = require('../../../../util/Constants'); +const CloneObject = require('../../../../util/CloneObject'); + +const Message = Structure('Message'); +const Guild = Structure('Guild'); + +class MessageUpdateHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + let channel = client.store.get('channels', data.channel_id); + + if (channel) { + let message = channel.store.get('messages', data.id); + if (message) { + let oldMessage = CloneObject(message); + message.patch(data); + client.emit(Constants.Events.MESSAGE_UPDATE, oldMessage, message); + } + } + + } + +}; + +module.exports = MessageUpdateHandler; diff --git a/src/structures/Message.js b/src/structures/Message.js index 8f600f929..025547e32 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -28,6 +28,38 @@ class Message { } } } + + patch(data) { + if (data.author) + this.author = this.guild.client.store.get('users', data.author.id); + if (data.content) + this.content = data.content; + if (data.timestamp) + this.timestamp = new Date(data.timestamp); + if (data.edited_timestamp) + this.editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp) : null; + if (data.tts) + this.tts = data.tts; + if (data.mention_everyone) + this.mentionEveryone = data.mention_everyone; + if (data.nonce) + this.nonce = data.nonce; + if (data.embeds) + this.embeds = data.embeds; + if (data.attachments) + this.attachments = data.attachments; + if (data.mentions) { + for (let mention of data.mentions) { + let user = this.guild.client.store.get('users', mention.id); + if (user) { + this.mentions.push(user); + } + } + } + + if (data.id) + this.id = data.id; + } } module.exports = Message; diff --git a/src/util/Constants.js b/src/util/Constants.js index ad5713e18..2b1705e0a 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -11,7 +11,7 @@ const DefaultOptions = exports.DefaultOptions = { }, }, protocol_version: 4, - max_message_cache: 20, + max_message_cache: 200, }; const Package = exports.Package = require('../../package.json'); @@ -101,6 +101,7 @@ const Events = exports.Events = { GUILD_MEMBERS_CHUNK: 'guildMembersChunk', MESSAGE_CREATE: 'message', MESSAGE_DELETE: 'messageDelete', + MESSAGE_UPDATE: 'messageUpdate', }; const WSEvents = exports.WSEvents = { diff --git a/test/random.js b/test/random.js index 54fde3c24..f55fcecac 100644 --- a/test/random.js +++ b/test/random.js @@ -75,3 +75,8 @@ client.on('message', message => { client.on('messageDelete', message => { console.log('Message deleted by', message.author.username); }); + +client.on('messageUpdate', (old, message) => { + if (message.author.username === 'hydrabolt') + console.log('Message updated from', old.content, 'to', message.content); +}); From da42b422f04be62521845cacb028aa84ec0f50f2 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Mon, 18 Apr 2016 19:31:36 +0100 Subject: [PATCH 016/324] Added Permission evaluation for channels and EvaluatedPermissions class. --- src/client/Client.js | 2 + src/client/ClientDataResolver.js | 59 +++++++++++++++++++++++++ src/structures/EvaluatedPermissions.js | 39 +++++++++++++++++ src/structures/Guild.js | 19 +++++++- src/structures/GuildMember.js | 6 +++ src/structures/ServerChannel.js | 60 +++++++++++++++++++++++++- src/util/Constants.js | 10 +++++ test/random.js | 7 +++ 8 files changed, 200 insertions(+), 2 deletions(-) create mode 100644 src/client/ClientDataResolver.js create mode 100644 src/structures/EvaluatedPermissions.js diff --git a/src/client/Client.js b/src/client/Client.js index 634cc790f..9a5fe5b64 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -6,6 +6,7 @@ const Constants = require('../util/Constants'); const RESTManager = require('./rest/RestManager'); const ClientDataStore = require('../structures/DataStore/ClientDataStore'); const ClientManager = require('./ClientManager'); +const ClientDataResolver = require('./ClientDataResolver'); const WebSocketManager = require('./websocket/WebSocketManager'); class Client extends EventEmitter{ @@ -17,6 +18,7 @@ class Client extends EventEmitter{ this.store = new ClientDataStore(this); this.manager = new ClientManager(this); this.ws = new WebSocketManager(this); + this.resolver = new ClientDataResolver(this); } login(email, password) { diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js new file mode 100644 index 000000000..47ee3f9fc --- /dev/null +++ b/src/client/ClientDataResolver.js @@ -0,0 +1,59 @@ +'use strict'; + +const Structure = name => require(`../structures/${name}`); + +const User = Structure('User'); +const Message = Structure('Message'); +const Guild = Structure('Guild'); +const ServerChannel = Structure('ServerChannel'); +const TextChannel = Structure('TextChannel'); +const VoiceChannel = Structure('VoiceChannel'); +const GuildMember = Structure('GuildMember'); + +function $string(obj) { + return (typeof obj === 'string' || obj instanceof String); +} + +class ClientDataResolver { + + constructor(client) { + this.client = client; + } + + ResolveUser(user) { + if (user instanceof User) { + return user; + }else if ($string(user)) { + return this.client.store.get('users', user); + }else if (user instanceof Message) { + return user.author; + }else if (user instanceof Guild) { + return user.owner; + } + + return null; + } + + ResolveGuild(guild) { + if (guild instanceof Guild) { + return guild; + } + } + + ResolveGuildMember(guild, user) { + if (user instanceof GuildMember) { + return user; + } + + guild = this.ResolveGuild(guild); + user = this.ResolveUser(user); + + if (!guild || !user) { + return null; + } + + return guild.store.get('members', user.id); + } +} + +module.exports = ClientDataResolver; diff --git a/src/structures/EvaluatedPermissions.js b/src/structures/EvaluatedPermissions.js new file mode 100644 index 000000000..96d0a4c9d --- /dev/null +++ b/src/structures/EvaluatedPermissions.js @@ -0,0 +1,39 @@ +'use strict'; + +const Constants = require('../Util/Constants'); + +class EvaluatedPermissions { + constructor(member, permissions) { + this.member = member; + this.permissions = permissions; + } + + serialize() { + let serializedPermissions = {}; + for (let permissionName in Constants.PermissionFlags) { + serializedPermissions[permissionName] = this.hasPermission(permissionName); + } + + return serializedPermissions; + } + + hasPermission(permission, explicit) { + if (permission instanceof String || typeof permission === 'string') { + permission = Constants.PermissionFlags[permission]; + } + + if (!permission) { + throw Constants.Errors.NOT_A_PERMISSION; + } + + if (!explicit) { + if ((this.permissions & Constants.PermissionFlags.MANAGE_ROLES) > 0) { + return true; + } + } + + return ((this.permissions & permission) > 0); + } +} + +module.exports = EvaluatedPermissions; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index f6fb90a00..462edee38 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -60,12 +60,15 @@ class Guild { return this.name; } + member(user) { + return this.client.resolver.ResolveGuildMember(this, user); + } + setup(data) { this.id = data.id; this.available = !data.unavailable; this.splash = data.splash; this.region = data.region; - this.ownerID = data.owner_id; this.name = data.name; this.memberCount = data.member_count; this.large = data.large; @@ -87,6 +90,8 @@ class Guild { } } + this.owner = this.store.get('members', data.owner_id); + if (data.channels) { this.store.clear('channels'); for (let channel of data.channels) { @@ -125,6 +130,18 @@ class Guild { } } } + + get channels() { return this.store.getAsArray('channels'); } + + get $channels() { return this.store.data.channels; } + + get roles() { return this.store.getAsArray('roles'); } + + get $roles() { return this.store.data.roles; } + + get members() { return this.store.getAsArray('members'); } + + get $members() { return this.store.data.members; } } module.exports = Guild; diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index e8b531db0..265f0afe6 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -25,6 +25,12 @@ class GuildMember { get roles() { let list = []; + let everyoneRole = this.guild.store.get('roles', this.guild.id); + + if (everyoneRole) { + list.push(everyoneRole); + } + for (let roleID of this._roles) { let role = this.guild.store.get('roles', roleID); if (role) { diff --git a/src/structures/ServerChannel.js b/src/structures/ServerChannel.js index 9be3bd58a..ebd7ea8b6 100644 --- a/src/structures/ServerChannel.js +++ b/src/structures/ServerChannel.js @@ -2,6 +2,8 @@ const Channel = require('./Channel'); const PermissionOverwrites = require('./PermissionOverwrites'); +const EvaluatedPermissions = require('./EvaluatedPermissions'); +const Constants = require('../util/Constants'); class ServerChannel extends Channel{ constructor(guild, data) { @@ -15,7 +17,7 @@ class ServerChannel extends Channel{ this.position = data.position; this.name = data.name; this.lastMessageID = data.last_message_id; - + this.ow = data.permission_overwrites; if (data.permission_overwrites) { this.permissionOverwrites = []; for (let overwrite of data.permission_overwrites) { @@ -24,6 +26,62 @@ class ServerChannel extends Channel{ } } + permissionsFor(member) { + member = this.client.resolver.ResolveGuildMember(this.guild, member); + if (member) { + if (this.guild.owner.id === member.id) { + return new EvaluatedPermissions(member, Constants.ALL_PERMISSIONS); + } + + let roles = member.roles; + let permissions = 0; + let overwrites = this.overwritesFor(member, true); + + for (let role of roles) { + permissions |= role.permissions; + } + + for (let overwrite of overwrites.role.concat(overwrites.member)) { + permissions = permissions & ~overwrite.denyData; + permissions = permissions | overwrite.allowData; + } + + if (!!(permissions & (Constants.PermissionFlags.MANAGE_ROLES))) { + permissions = Constants.ALL_PERMISSIONS; + } + + return new EvaluatedPermissions(member, permissions); + } + } + + overwritesFor(member, verified) { + // for speed + if (!verified) + member = this.client.resolver.ResolveGuildMember(this.guild, member); + if (member) { + let found = []; + let memberRoles = member._roles; + + let roleOverwrites = []; + let memberOverwrites = []; + + for (let overwrite of this.permissionOverwrites) { + if (overwrite.id === member.id) { + memberOverwrites.push(overwrite); + } else if (memberRoles.indexOf(overwrite.id) > -1) { + roleOverwrites.push(overwrite); + } + } + + return { + role: roleOverwrites, + member: memberOverwrites, + }; + } + + return []; + } + toString() { return this.name; } diff --git a/src/util/Constants.js b/src/util/Constants.js index 2b1705e0a..802b1714c 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -1,3 +1,5 @@ +'use strict'; + const DefaultOptions = exports.DefaultOptions = { ws: { large_threshold: 250, @@ -157,4 +159,12 @@ const PermissionFlags = exports.PermissionFlags = { USE_VAD: 1 << 25, }; +let _ALL_PERMISSIONS = 0; + +for (let key in PermissionFlags) { + _ALL_PERMISSIONS |= PermissionFlags[key]; +} + +const ALL_PERMISSIONS = exports.ALL_PERMISSIONS = _ALL_PERMISSIONS; + const DEFAULT_PERMISSIONS = exports.DEFAULT_PERMISSIONS = 36953089; diff --git a/test/random.js b/test/random.js index f55fcecac..64575e0c5 100644 --- a/test/random.js +++ b/test/random.js @@ -80,3 +80,10 @@ client.on('messageUpdate', (old, message) => { if (message.author.username === 'hydrabolt') console.log('Message updated from', old.content, 'to', message.content); }); + +client.on('message', message => { + if (message.content === '?perms?') { + console.log(message.author.username, 'asked for perms in', message.channel.name, ':'); + console.log(message.channel.permissionsFor(message.author).serialize()); + } +}); From acc9c9bf123ac2c4afd42e5d18ea4612600141b5 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Tue, 19 Apr 2016 20:24:23 +0100 Subject: [PATCH 017/324] src/client/websocket/packets/WebSocketPacketManager.js src/structures/datastore/WebSocketManagerDataStore.js Added "rough" reconnection attempting The following however still needs to be done: 1) stop trying after a certain amount of time 2) increasing timeout between each timeout 3) re-evaluate the current method of how reconnecting is handled internally --- src/client/websocket/WebSocketManager.js | 45 +++++++++++++++++-- .../packets/WebSocketPacketManager.js | 28 ++++++++++-- .../websocket/packets/handlers/Ready.js | 2 + .../datastore/WebSocketManagerDataStore.js | 14 ++++++ test/random.js | 3 +- 5 files changed, 85 insertions(+), 7 deletions(-) create mode 100644 src/structures/datastore/WebSocketManagerDataStore.js diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 41c7ea407..83324576b 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -4,6 +4,7 @@ const WebSocket = require('ws'); const Constants = require('../../util/Constants'); const zlib = require('zlib'); const PacketManager = require('./packets/WebSocketPacketManager'); +const WebSocketManagerDataStore = require('../../structures/datastore/WebSocketManagerDataStore'); class WebSocketManager { @@ -12,9 +13,12 @@ class WebSocketManager { this.ws = null; this.packetManager = new PacketManager(this); this.emittedReady = false; + this.store = new WebSocketManagerDataStore(); + this.reconnecting = false; } connect(gateway) { + this.store.gateway = gateway; gateway += `/?v=${this.client.options.protocol_version}`; this.ws = new WebSocket(gateway); this.ws.onopen = () => this.EventOpen(); @@ -24,10 +28,34 @@ class WebSocketManager { } send(data) { - this.ws.send(JSON.stringify(data)); + if (this.ws.readyState === WebSocket.OPEN) { + this.ws.send(JSON.stringify(data)); + } } EventOpen() { + if (this.reconnecting) { + this._sendResume(); + } else { + this._sendNewIdentify(); + } + } + + _sendResume() { + let payload = { + token: this.client.store.token, + session_id: this.store.sessionID, + seq: this.store.sequence, + }; + + this.send({ + op: Constants.OPCodes.RESUME, + d: payload, + }); + } + + _sendNewIdentify() { + this.reconnecting = false; let payload = this.client.options.ws; payload.token = this.client.store.token; @@ -38,7 +66,9 @@ class WebSocketManager { } EventClose() { - + if (!this.reconnecting) { + this.tryReconnect(); + } } EventMessage(event) { @@ -57,7 +87,7 @@ class WebSocketManager { } EventError(e) { - + this.tryReconnect(); } checkIfReady() { @@ -75,6 +105,15 @@ class WebSocketManager { } } } + + tryReconnect() { + this.reconnecting = true; + this.ws.close(); + this.packetManager.handleQueue(); + this.client.emit(Constants.Events.RECONNECTING); + this.emittedReady = false; + this.connect(this.store.gateway); + } } module.exports = WebSocketManager; diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 8e0341757..2f01da2a7 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -8,8 +8,6 @@ const BeforeReadyWhitelist = [ Constants.WSEvents.GUILD_DELETE, ]; -var amount = 0; - class WebSocketPacketManager { constructor(websocketManager) { @@ -58,8 +56,32 @@ class WebSocketPacketManager { } } + setSequence(s) { + if (s && s > this.ws.store.sequence) { + this.ws.store.sequence = s; + } + } + handle(packet) { - amount++; + + if (packet.op === Constants.OPCodes.RECONNECT) { + this.setSequence(packet.s); + this.ws.tryReconnect(); + return; + } + + if (packet.op === Constants.OPCodes.INVALID_SESSION) { + this.ws._sendNewIdentify(); + return; + } + + if (this.ws.reconnecting) { + this.ws.reconnecting = false; + this.ws.checkIfReady(); + } + + this.setSequence(packet.s); + if (!this.ws.emittedReady) { if (BeforeReadyWhitelist.indexOf(packet.t) === -1) { this.queue.push(packet); diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index b5bd514f3..ffd4cd0cb 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -28,6 +28,8 @@ class ReadyHandler extends AbstractHandler { client.store.NewChannel(privateDM); } + this.packetManager.ws.store.sessionID = data.session_id; + this.packetManager.ws.checkIfReady(); } diff --git a/src/structures/datastore/WebSocketManagerDataStore.js b/src/structures/datastore/WebSocketManagerDataStore.js new file mode 100644 index 000000000..a63d41369 --- /dev/null +++ b/src/structures/datastore/WebSocketManagerDataStore.js @@ -0,0 +1,14 @@ +'use strict'; + +const AbstractDataStore = require('./AbstractDataStore'); + +class WebSocketManagerDataStore extends AbstractDataStore{ + constructor() { + super(); + this.sessionID = null; + this.sequence = -1; + this.gateway = null; + } +} + +module.exports = WebSocketManagerDataStore; diff --git a/test/random.js b/test/random.js index 64575e0c5..8e4b8e315 100644 --- a/test/random.js +++ b/test/random.js @@ -4,9 +4,10 @@ const Discord = require('../'); let client = new Discord.Client(); -client.login(require('./auth.json').token).then(token => console.log('ready!')).catch(console.log); +client.login(require('./auth.json').token).then(token => console.log('logged in with token ' + token)).catch(console.log); client.on('ready', () => { + console.log('ready!'); }); client.on('guildCreate', (guild) => { From b8283a8f299af40daed8ff4c6d1fb1541fad8ac7 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Wed, 20 Apr 2016 17:45:20 +0100 Subject: [PATCH 018/324] src/client/websocket/packets/WebSocketPacketManager.js Unify ready and reconnecting properties into a single status property and future-proof Message class The state of the WebSocketManager is now represented by a single status property, removing emittedReady and reconnecting as representations of state. Message class will now also cache users it isn't aware of that appear in mentions and authors. --- src/client/websocket/WebSocketManager.js | 11 +++++------ .../websocket/packets/WebSocketPacketManager.js | 2 +- src/structures/Guild.js | 6 +++--- src/structures/Message.js | 8 +++++++- src/structures/datastore/ClientDataStore.js | 2 +- src/util/Constants.js | 7 +++++++ 6 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 83324576b..a3d7f08ca 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -12,12 +12,12 @@ class WebSocketManager { this.client = client; this.ws = null; this.packetManager = new PacketManager(this); - this.emittedReady = false; this.store = new WebSocketManagerDataStore(); - this.reconnecting = false; + this.status = Constants.Status.IDLE; } connect(gateway) { + this.status = Constants.Status.CONNECTING; this.store.gateway = gateway; gateway += `/?v=${this.client.options.protocol_version}`; this.ws = new WebSocket(gateway); @@ -91,7 +91,7 @@ class WebSocketManager { } checkIfReady() { - if (!this.emittedReady) { + if (this.status !== Constants.Status.READY) { let unavailableCount = 0; for (let guildID in this.client.store.data.guilds) { @@ -99,19 +99,18 @@ class WebSocketManager { } if (unavailableCount === 0) { + this.status = Constants.Status.READY; this.client.emit(Constants.Events.READY); - this.emittedReady = true; this.packetManager.handleQueue(); } } } tryReconnect() { - this.reconnecting = true; + this.status = Constants.Status.RECONNECTING; this.ws.close(); this.packetManager.handleQueue(); this.client.emit(Constants.Events.RECONNECTING); - this.emittedReady = false; this.connect(this.store.gateway); } } diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 2f01da2a7..b4e123033 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -82,7 +82,7 @@ class WebSocketPacketManager { this.setSequence(packet.s); - if (!this.ws.emittedReady) { + if (this.ws.status !== Constants.Status.READY) { if (BeforeReadyWhitelist.indexOf(packet.t) === -1) { this.queue.push(packet); return; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 462edee38..766cc6955 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -33,7 +33,7 @@ class Guild { guildUser.joined_at = guildUser.joined_at || 0; let member = this.store.add('members', new GuildMember(this, guildUser)); - if (this.client.ws.emittedReady && !noEvent) { + if (this.client.ws.status === Constants.Status.READY && !noEvent) { this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, member); } @@ -44,14 +44,14 @@ class Guild { let oldRoles = member.roles; member._roles = data.roles; - if (this.client.ws.emittedReady) { + if (this.client.ws.status === Constants.Status.READY) { this.client.emit(Constants.Events.GUILD_MEMBER_ROLES_UPDATE, this, oldRoles, member.roles); } } _removeMember(guildMember) { this.store.remove('members', guildMember); - if (this.client.ws.emittedReady) { + if (this.client.ws.status === Constants.Status.READY) { this.client.emit(Constants.Events.GUILD_MEMBER_REMOVE, this, guildMember); } } diff --git a/src/structures/Message.js b/src/structures/Message.js index 025547e32..b0262e04a 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -10,7 +10,7 @@ class Message { } setup(data) { - this.author = this.guild.client.store.get('users', data.author.id); + this.author = this.guild.client.store.NewUser(data.author); this.content = data.content; this.timestamp = new Date(data.timestamp); this.editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp) : null; @@ -25,6 +25,9 @@ class Message { let user = this.guild.client.store.get('users', mention.id); if (user) { this.mentions.push(user); + } else { + user = this.guild.client.store.NewUser(mention); + this.mentions.push(user); } } } @@ -53,6 +56,9 @@ class Message { let user = this.guild.client.store.get('users', mention.id); if (user) { this.mentions.push(user); + } else { + user = this.guild.client.store.NewUser(mention); + this.mentions.push(user); } } } diff --git a/src/structures/datastore/ClientDataStore.js b/src/structures/datastore/ClientDataStore.js index 6b9a89488..8cae0c97e 100644 --- a/src/structures/datastore/ClientDataStore.js +++ b/src/structures/datastore/ClientDataStore.js @@ -25,7 +25,7 @@ class ClientDataStore extends AbstractDataStore{ } get pastReady() { - return this.client.ws.emittedReady; + return this.client.ws.status === Constants.Status.READY; } NewGuild(data) { diff --git a/src/util/Constants.js b/src/util/Constants.js index 802b1714c..43ad1819c 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -16,6 +16,13 @@ const DefaultOptions = exports.DefaultOptions = { max_message_cache: 200, }; +const Status = exports.Status = { + READY: 0, + CONNECTING: 1, + RECONNECTING: 2, + IDLE: 3, +}; + const Package = exports.Package = require('../../package.json'); const Errors = exports.Errors = { From f3e1760538887b4bb7c2c275961978b905eccb37 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Thu, 21 Apr 2016 17:42:52 +0100 Subject: [PATCH 019/324] add channel.sendMessage and channel.sendTTSMessage --- src/client/rest/RESTMethods.js | 18 +++++++++++++++ .../packets/handlers/MessageCreate.js | 2 +- src/structures/DMChannel.js | 4 ++++ src/structures/Message.js | 23 +++++++++++-------- src/structures/TextChannel.js | 3 +++ src/structures/interface/TextBasedChannel.js | 20 ++++++++++++++++ test/random.js | 2 +- 7 files changed, 61 insertions(+), 11 deletions(-) create mode 100644 src/structures/interface/TextBasedChannel.js diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 228f6f7da..2f2c27f87 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -1,6 +1,9 @@ 'use strict'; const Constants = require('../../util/Constants'); +const Structure = name => require('../../structures/' + name); + +const Message = Structure('Message'); class RESTMethods{ constructor(restManager) { @@ -32,6 +35,21 @@ class RESTMethods{ .catch(reject); }); } + + SendMessage(channel, content, tts, nonce) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('post', Constants.Endpoints.CHANNEL_MESSAGES(channel.id), true, { + content, tts, nonce, + }) + .then(data => { + let message = new Message(channel, data, this.rest.client); + channel._cacheMessage(message); + resolve(message); + this.rest.client.emit(Constants.Events.MESSAGE_CREATE, message); + }) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/client/websocket/packets/handlers/MessageCreate.js b/src/client/websocket/packets/handlers/MessageCreate.js index f6e2cf35e..d701d0a97 100644 --- a/src/client/websocket/packets/handlers/MessageCreate.js +++ b/src/client/websocket/packets/handlers/MessageCreate.js @@ -19,7 +19,7 @@ class MessageCreateHandler extends AbstractHandler { let channel = client.store.get('channels', data.channel_id); if (channel) { - let message = new Message(channel, data); + let message = new Message(channel, data, client); channel._cacheMessage(message); client.emit(Constants.Events.MESSAGE_CREATE, message); } diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index f755c3b87..f0b7523b2 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -1,6 +1,7 @@ 'use strict'; const Channel = require('./Channel'); +const TextBasedChannel = require('./interface/TextBasedChannel'); const User = require('./User'); const TextChannelDataStore = require('./datastore/TextChannelDataStore'); @@ -26,6 +27,7 @@ class DMChannel extends Channel{ } setup(data) { + super.setup(data); this.recipient = this.client.store.add('users', new User(this.client, data.recipient)); this.lastMessageID = data.last_message_id; } @@ -35,4 +37,6 @@ class DMChannel extends Channel{ } } +TextBasedChannel.applyToClass(DMChannel); + module.exports = DMChannel; diff --git a/src/structures/Message.js b/src/structures/Message.js index b0262e04a..b5a0b3e12 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -1,16 +1,21 @@ 'use strict'; class Message { - constructor(serverChannel, data) { - this.channel = serverChannel; - this.guild = serverChannel.guild; + constructor(channel, data, client) { + this.channel = channel; + + if (channel.guild) { + this.guild = channel.guild; + } + + this.client = client; if (data) { this.setup(data); } } setup(data) { - this.author = this.guild.client.store.NewUser(data.author); + this.author = this.client.store.NewUser(data.author); this.content = data.content; this.timestamp = new Date(data.timestamp); this.editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp) : null; @@ -22,11 +27,11 @@ class Message { this.mentions = []; this.id = data.id; for (let mention of data.mentions) { - let user = this.guild.client.store.get('users', mention.id); + let user = this.client.store.get('users', mention.id); if (user) { this.mentions.push(user); } else { - user = this.guild.client.store.NewUser(mention); + user = this.client.store.NewUser(mention); this.mentions.push(user); } } @@ -34,7 +39,7 @@ class Message { patch(data) { if (data.author) - this.author = this.guild.client.store.get('users', data.author.id); + this.author = this.client.store.get('users', data.author.id); if (data.content) this.content = data.content; if (data.timestamp) @@ -53,11 +58,11 @@ class Message { this.attachments = data.attachments; if (data.mentions) { for (let mention of data.mentions) { - let user = this.guild.client.store.get('users', mention.id); + let user = this.client.store.get('users', mention.id); if (user) { this.mentions.push(user); } else { - user = this.guild.client.store.NewUser(mention); + user = this.client.store.NewUser(mention); this.mentions.push(user); } } diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index eac0f45f6..a93c831be 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -2,6 +2,7 @@ const ServerChannel = require('./ServerChannel'); const TextChannelDataStore = require('./datastore/TextChannelDataStore'); +const TextBasedChannel = require('./interface/TextBasedChannel'); class TextChannel extends ServerChannel { @@ -26,4 +27,6 @@ class TextChannel extends ServerChannel { } } +TextBasedChannel.applyToClass(TextChannel); + module.exports = TextChannel; diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js new file mode 100644 index 000000000..0656d03f7 --- /dev/null +++ b/src/structures/interface/TextBasedChannel.js @@ -0,0 +1,20 @@ +'use strict'; + +function sendMessage(content, options) { + options = options || {}; + return this.client.rest.methods.SendMessage(this, content, options.tts); +} + +function sendTTSMessage(content, options) { + options = options || {}; + return this.client.rest.methods.SendMessage(this, content, true); +} + +exports.applyToClass = structure => { + if (structure.name !== 'TextChannel' && structure.name !== 'DMChannel') { + throw new Error(structure + ' cannot implement TextBasedChannel'); + } + + structure.prototype.sendMessage = sendMessage; + +}; diff --git a/test/random.js b/test/random.js index 8e4b8e315..87633f281 100644 --- a/test/random.js +++ b/test/random.js @@ -70,7 +70,7 @@ client.on('typingStop.', (channel, user, data) => { client.on('message', message => { if (message.author.username === 'hydrabolt') - console.log(message.author.username, 'said', message.content, 'in', message.channel.name); + message.channel.sendMessage('hydrabolt said: ' + message.content).then(console.log).catch(console.log); }); client.on('messageDelete', message => { From 03caddb4b5e0d01035da53470e288215274f0018 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Thu, 21 Apr 2016 18:24:08 +0100 Subject: [PATCH 020/324] Add Rate Limiting, see hammerandchisel/discord-api-docs#20 --- src/client/rest/RESTManager.js | 55 +++++++++++++++++++++++++++++++++- test/random.js | 2 +- 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/src/client/rest/RESTManager.js b/src/client/rest/RESTManager.js index 5cda94ccd..926a4de82 100644 --- a/src/client/rest/RESTManager.js +++ b/src/client/rest/RESTManager.js @@ -12,14 +12,57 @@ class RESTManager{ this.queue = []; this.userAgentManager = new UserAgentManager(this); this.methods = new RESTMethods(this); + this.rateLimitedEndpoints = {}; } - makeRequest(method, url, auth, data, file) { + addRequestToQueue(method, url, auth, data, file, resolve, reject) { + let endpoint = url.replace(/\/[0-9]+/g, '/:id'); + + let rateLimitedEndpoint = this.rateLimitedEndpoints[endpoint]; + + rateLimitedEndpoint.queue = rateLimitedEndpoint.queue || []; + + rateLimitedEndpoint.queue.push({ + method, url, auth, data, file, resolve, reject, + }); + } + + processQueue(endpoint) { + let rateLimitedEndpoint = this.rateLimitedEndpoints[endpoint]; + + // prevent multiple queue processes + if (!rateLimitedEndpoint.timeout) { + return; + } + + // lock the queue + clearTimeout(rateLimitedEndpoint.timeout); + rateLimitedEndpoint.timeout = null; + + for (let item of rateLimitedEndpoint.queue) { + this.makeRequest(item.method, item.url, item.auth, item.data, item.file) + .then(item.resolve) + .catch(item.reject); + } + + rateLimitedEndpoint.queue = []; + } + + makeRequest(method, url, auth, data, file, fromQueue) { /* file is {file, name} */ let apiRequest = request[method](url); + let endpoint = url.replace(/\/[0-9]+/g, '/:id'); + + if (this.rateLimitedEndpoints[endpoint] && this.rateLimitedEndpoints[endpoint].timeout) { + console.log('adding to queue'); + return new Promise((resolve, reject) => { + this.addRequestToQueue(method, url, auth, data, file, resolve, reject); + }); + } + if (auth) { if (this.client.store.token) { apiRequest.set('authorization', this.client.store.token); @@ -41,6 +84,16 @@ class RESTManager{ return new Promise((resolve, reject) => { apiRequest.end((err, res) => { if (err) { + let retry = res.headers['retry-after'] || res.headers['Retry-After']; + if (retry) { + this.rateLimitedEndpoints[endpoint] = {}; + this.addRequestToQueue(method, url, auth, data, file, resolve, reject); + this.rateLimitedEndpoints[endpoint].timeout = setTimeout(() => { + this.processQueue(endpoint); + }, retry); + return; + } + reject(err); } else { resolve(res ? res.body || {} : {}); diff --git a/test/random.js b/test/random.js index 87633f281..8bc302fdd 100644 --- a/test/random.js +++ b/test/random.js @@ -70,7 +70,7 @@ client.on('typingStop.', (channel, user, data) => { client.on('message', message => { if (message.author.username === 'hydrabolt') - message.channel.sendMessage('hydrabolt said: ' + message.content).then(console.log).catch(console.log); + message.channel.sendMessage('hydrabolt said: ' + message.content).then(m => console.log(m.content)).catch(console.log); }); client.on('messageDelete', message => { From a2841f285c37311279c2ffcdb6cc86d67a59967d Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Thu, 21 Apr 2016 18:40:26 +0100 Subject: [PATCH 021/324] Add TODO list --- TODO.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 TODO.md diff --git a/TODO.md b/TODO.md new file mode 100644 index 000000000..d3020a8bd --- /dev/null +++ b/TODO.md @@ -0,0 +1,33 @@ +# To-do list: +- [x] sending messages +- [x] sending tts messages +- [ ] sending files +- [ ] updating user details +- [ ] deleting messages +- [ ] updating messages +- [ ] leaving guilds +- [ ] deleting guilds +- [ ] _joining guilds_ +- [ ] creating channels +- [ ] updating channels +- [ ] deleting channels +- [ ] making roles +- [ ] deleting roles +- [ ] updating roles +- [ ] logging out +- [ ] modifying channel overwrites +- [ ] fetching guild members +- [ ] getting channel logs +- [ ] getting bans +- [ ] banning members +- [ ] unbanning members +- [ ] kicking members +- [ ] moving voice channel members +- [ ] muting/deafening voice channel members +- [ ] voice support +- [ ] adding members to roles +- [ ] creating invites +- [ ] updating invites +- [ ] deleting invites +- [ ] getting invites +- [ ] typing simulation \ No newline at end of file From c42e303b7b455c107f0965ad2fe00b9ca4c6349c Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Thu, 21 Apr 2016 18:50:46 +0100 Subject: [PATCH 022/324] Add Message Deletion via message.delete() --- TODO.md | 2 +- src/client/rest/RESTMethods.js | 10 ++++++++++ src/structures/Message.js | 4 ++++ test/random.js | 7 +++++-- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/TODO.md b/TODO.md index d3020a8bd..090d3ebe0 100644 --- a/TODO.md +++ b/TODO.md @@ -3,7 +3,7 @@ - [x] sending tts messages - [ ] sending files - [ ] updating user details -- [ ] deleting messages +- [x] deleting messages - [ ] updating messages - [ ] leaving guilds - [ ] deleting guilds diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 2f2c27f87..e1066893d 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -50,6 +50,16 @@ class RESTMethods{ .catch(reject); }); } + + DeleteMessage(channel, message) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.CHANNEL_MESSAGE(channel.id, message.id), true) + .then(() => { + resolve(message); + }) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/structures/Message.js b/src/structures/Message.js index b5a0b3e12..6e501ede2 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -71,6 +71,10 @@ class Message { if (data.id) this.id = data.id; } + + delete() { + return this.client.rest.methods.DeleteMessage(this.channel, this); + } } module.exports = Message; diff --git a/test/random.js b/test/random.js index 8bc302fdd..52e1f57d4 100644 --- a/test/random.js +++ b/test/random.js @@ -69,8 +69,11 @@ client.on('typingStop.', (channel, user, data) => { }); client.on('message', message => { - if (message.author.username === 'hydrabolt') - message.channel.sendMessage('hydrabolt said: ' + message.content).then(m => console.log(m.content)).catch(console.log); + if (message.author.username === 'hydrabolt') { + message.channel.sendMessage('test').then(msg => { + msg.delete(); + }); + } }); client.on('messageDelete', message => { From 1676a5e73f9ceb427b40429106572931f166d412 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 24 Apr 2016 16:30:58 +0100 Subject: [PATCH 023/324] Bridged WebSocket Events and REST Requests. Now REST Requests will respond exactly like WS Events to data --- src/client/Client.js | 2 + src/client/actions/Action.js | 27 ++++++++++++ src/client/actions/ActionsManager.js | 19 +++++++++ src/client/actions/MessageCreate.js | 31 ++++++++++++++ src/client/actions/MessageDelete.js | 42 +++++++++++++++++++ src/client/rest/RESTManager.js | 1 - src/client/rest/RESTMethods.js | 12 +++--- .../packets/handlers/MessageCreate.js | 10 ++--- .../packets/handlers/MessageDelete.js | 13 +++--- src/structures/TextChannel.js | 2 +- src/util/Constants.js | 1 + test/random.js | 2 +- 12 files changed, 139 insertions(+), 23 deletions(-) create mode 100644 src/client/actions/Action.js create mode 100644 src/client/actions/ActionsManager.js create mode 100644 src/client/actions/MessageCreate.js create mode 100644 src/client/actions/MessageDelete.js diff --git a/src/client/Client.js b/src/client/Client.js index 9a5fe5b64..d48f6c2a8 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -8,6 +8,7 @@ const ClientDataStore = require('../structures/DataStore/ClientDataStore'); const ClientManager = require('./ClientManager'); const ClientDataResolver = require('./ClientDataResolver'); const WebSocketManager = require('./websocket/WebSocketManager'); +const ActionsManager = require('./actions/ActionsManager'); class Client extends EventEmitter{ @@ -19,6 +20,7 @@ class Client extends EventEmitter{ this.manager = new ClientManager(this); this.ws = new WebSocketManager(this); this.resolver = new ClientDataResolver(this); + this.actions = new ActionsManager(this); } login(email, password) { diff --git a/src/client/actions/Action.js b/src/client/actions/Action.js new file mode 100644 index 000000000..795022b6d --- /dev/null +++ b/src/client/actions/Action.js @@ -0,0 +1,27 @@ +'use strict'; + +/* + +ABOUT ACTIONS + +Actions are similar to WebSocket Packet Handlers, but since introducing +the REST API methods, in order to prevent rewriting code to handle data, +"actions" have been introduced. They're basically what Packet Handlers +used to be but they're strictly for manipulating data and making sure +that WebSocket events don't clash with REST methods. + + */ + +class GenericAction { + + constructor(client) { + this.client = client; + } + + handle(data) { + + } + +}; + +module.exports = GenericAction; diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js new file mode 100644 index 000000000..aef572bc4 --- /dev/null +++ b/src/client/actions/ActionsManager.js @@ -0,0 +1,19 @@ +'use strict'; + +const requireAction = name => require(`./${name}`); + +class ActionsManager { + constructor(client) { + this.client = client; + + this.register('MessageCreate'); + this.register('MessageDelete'); + } + + register(name) { + let Action = requireAction(name); + this[name] = new Action(this.client); + } +} + +module.exports = ActionsManager; diff --git a/src/client/actions/MessageCreate.js b/src/client/actions/MessageCreate.js new file mode 100644 index 000000000..55bae8b4e --- /dev/null +++ b/src/client/actions/MessageCreate.js @@ -0,0 +1,31 @@ +'use strict'; + +const Action = require('./Action'); +const Constants = require('../../util/Constants'); +const Message = require('../../structures/Message'); + +class MessageCreateAction extends Action { + + constructor(client) { + super(client); + } + + handle(data) { + + let client = this.client; + let channel = client.store.get('channels', data.channel_id); + + if (channel) { + let message = channel._cacheMessage(new Message(channel, data, client)); + return { + m: message, + }; + } + + return { + m: null, + }; + } +}; + +module.exports = MessageCreateAction; diff --git a/src/client/actions/MessageDelete.js b/src/client/actions/MessageDelete.js new file mode 100644 index 000000000..9f82f0a15 --- /dev/null +++ b/src/client/actions/MessageDelete.js @@ -0,0 +1,42 @@ +'use strict'; + +const Action = require('./Action'); +const Constants = require('../../util/Constants'); +const Message = require('../../structures/Message'); + +class MessageDeleteAction extends Action { + + constructor(client) { + super(client); + this.timeouts = []; + } + + handle(data) { + let client = this.client; + let channel = client.store.get('channels', data.channel_id); + if (channel) { + let message = channel.store.get('messages', data.id); + if (message && !message._deleted) { + message._deleted = true; + this.scheduleForDeletion(channel, message.id); + } + + return { + m: message, + }; + } + + return { + m: null, + }; + } + + scheduleForDeletion(channel, id) { + this.timeouts.push( + setTimeout(() => channel.store.remove('messages', id), + this.client.options.rest_ws_bridge_timeout) + ); + } +}; + +module.exports = MessageDeleteAction; diff --git a/src/client/rest/RESTManager.js b/src/client/rest/RESTManager.js index 926a4de82..60c021a47 100644 --- a/src/client/rest/RESTManager.js +++ b/src/client/rest/RESTManager.js @@ -57,7 +57,6 @@ class RESTManager{ let endpoint = url.replace(/\/[0-9]+/g, '/:id'); if (this.rateLimitedEndpoints[endpoint] && this.rateLimitedEndpoints[endpoint].timeout) { - console.log('adding to queue'); return new Promise((resolve, reject) => { this.addRequestToQueue(method, url, auth, data, file, resolve, reject); }); diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index e1066893d..6f8c1e6ea 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -42,10 +42,7 @@ class RESTMethods{ content, tts, nonce, }) .then(data => { - let message = new Message(channel, data, this.rest.client); - channel._cacheMessage(message); - resolve(message); - this.rest.client.emit(Constants.Events.MESSAGE_CREATE, message); + resolve(this.rest.client.actions.MessageCreate.handle(data).m); }) .catch(reject); }); @@ -54,8 +51,11 @@ class RESTMethods{ DeleteMessage(channel, message) { return new Promise((resolve, reject) => { this.rest.makeRequest('del', Constants.Endpoints.CHANNEL_MESSAGE(channel.id, message.id), true) - .then(() => { - resolve(message); + .then(data => { + resolve(this.rest.client.actions.MessageDelete.handle({ + id: message.id, + channel_id: message.channel.id, + }).m); }) .catch(reject); }); diff --git a/src/client/websocket/packets/handlers/MessageCreate.js b/src/client/websocket/packets/handlers/MessageCreate.js index d701d0a97..76241e37e 100644 --- a/src/client/websocket/packets/handlers/MessageCreate.js +++ b/src/client/websocket/packets/handlers/MessageCreate.js @@ -16,14 +16,12 @@ class MessageCreateHandler extends AbstractHandler { handle(packet) { let data = packet.d; let client = this.packetManager.client; - let channel = client.store.get('channels', data.channel_id); - if (channel) { - let message = new Message(channel, data, client); - channel._cacheMessage(message); - client.emit(Constants.Events.MESSAGE_CREATE, message); + let response = client.actions.MessageCreate.handle(data); + + if (response.m) { + client.emit(Constants.Events.MESSAGE_CREATE, response.m); } - } }; diff --git a/src/client/websocket/packets/handlers/MessageDelete.js b/src/client/websocket/packets/handlers/MessageDelete.js index 43944fcbc..c3457f920 100644 --- a/src/client/websocket/packets/handlers/MessageDelete.js +++ b/src/client/websocket/packets/handlers/MessageDelete.js @@ -16,15 +16,12 @@ class MessageDeleteHandler extends AbstractHandler { handle(packet) { let data = packet.d; let client = this.packetManager.client; - let channel = client.store.get('channels', data.channel_id); - if (channel) { - let message = channel.store.get('messages', data.id); - if (message) { - channel.store.remove('messages', message.id); - client.emit(Constants.Events.MESSAGE_DELETE, message); - } - } + let response = client.actions.MessageDelete.handle(data); + + if (response.m) { + client.emit(Constants.Events.MESSAGE_DELETE, response.m); + } } }; diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index a93c831be..73986118c 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -23,7 +23,7 @@ class TextChannel extends ServerChannel { this.store.remove(storeKeys[0]); } - this.store.add('messages', message); + return this.store.add('messages', message); } } diff --git a/src/util/Constants.js b/src/util/Constants.js index 43ad1819c..54df21ad5 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -14,6 +14,7 @@ const DefaultOptions = exports.DefaultOptions = { }, protocol_version: 4, max_message_cache: 200, + rest_ws_bridge_timeout: 5000, }; const Status = exports.Status = { diff --git a/test/random.js b/test/random.js index 52e1f57d4..f38301d9b 100644 --- a/test/random.js +++ b/test/random.js @@ -71,7 +71,7 @@ client.on('typingStop.', (channel, user, data) => { client.on('message', message => { if (message.author.username === 'hydrabolt') { message.channel.sendMessage('test').then(msg => { - msg.delete(); + msg.delete().catch(console.log); }); } }); From 618d8bb95786cbbbd19bbdab327bebb46f3d490f Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 24 Apr 2016 16:41:23 +0100 Subject: [PATCH 024/324] Simplified client.rest.methods.DeleteMessage, now only takes a message instead of a channel and a message. --- src/client/rest/RESTMethods.js | 4 ++-- src/structures/Message.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 6f8c1e6ea..9d2093fa9 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -48,9 +48,9 @@ class RESTMethods{ }); } - DeleteMessage(channel, message) { + DeleteMessage(message) { return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.CHANNEL_MESSAGE(channel.id, message.id), true) + this.rest.makeRequest('del', Constants.Endpoints.CHANNEL_MESSAGE(message.channel.id, message.id), true) .then(data => { resolve(this.rest.client.actions.MessageDelete.handle({ id: message.id, diff --git a/src/structures/Message.js b/src/structures/Message.js index 6e501ede2..826ef049e 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -73,7 +73,7 @@ class Message { } delete() { - return this.client.rest.methods.DeleteMessage(this.channel, this); + return this.client.rest.methods.DeleteMessage(this); } } From e9d7dfaee317065ca3e92c63b7902b3e724f9982 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 24 Apr 2016 17:30:58 +0100 Subject: [PATCH 025/324] Added message.edit(content) --- TODO.md | 2 +- src/client/actions/ActionsManager.js | 1 + src/client/actions/MessageUpdate.js | 38 +++++++++++++++++++ src/client/rest/RESTMethods.js | 12 ++++++ .../packets/handlers/MessageUpdate.js | 12 ++---- src/structures/Message.js | 31 +++++++++++++++ test/random.js | 2 +- 7 files changed, 88 insertions(+), 10 deletions(-) create mode 100644 src/client/actions/MessageUpdate.js diff --git a/TODO.md b/TODO.md index 090d3ebe0..e11806d5d 100644 --- a/TODO.md +++ b/TODO.md @@ -4,7 +4,7 @@ - [ ] sending files - [ ] updating user details - [x] deleting messages -- [ ] updating messages +- [x] updating messages - [ ] leaving guilds - [ ] deleting guilds - [ ] _joining guilds_ diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index aef572bc4..0bfc0cc47 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -8,6 +8,7 @@ class ActionsManager { this.register('MessageCreate'); this.register('MessageDelete'); + this.register('MessageUpdate'); } register(name) { diff --git a/src/client/actions/MessageUpdate.js b/src/client/actions/MessageUpdate.js new file mode 100644 index 000000000..13b414fe4 --- /dev/null +++ b/src/client/actions/MessageUpdate.js @@ -0,0 +1,38 @@ +'use strict'; + +const Action = require('./Action'); +const Constants = require('../../util/Constants'); +const CloneObject = require('../../util/CloneObject'); +const Message = require('../../structures/Message'); + +class MessageUpdateAction extends Action { + + constructor(client) { + super(client); + } + + handle(data) { + + let client = this.client; + let channel = client.store.get('channels', data.channel_id); + + if (channel) { + let message = channel.store.get('messages', data.id); + if (message && !message.equals(data, true)) { + let oldMessage = CloneObject(message); + message.patch(data); + return { + old: oldMessage, + updated: message, + }; + } + } + + return { + old: null, + updated: null, + }; + } +}; + +module.exports = MessageUpdateAction; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 9d2093fa9..827861073 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -60,6 +60,18 @@ class RESTMethods{ .catch(reject); }); } + + UpdateMessage(message, content) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('patch', Constants.Endpoints.CHANNEL_MESSAGE(message.channel.id, message.id), true, { + content, + }) + .then(data => { + resolve(this.rest.client.actions.MessageUpdate.handle(data).updated); + }) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/client/websocket/packets/handlers/MessageUpdate.js b/src/client/websocket/packets/handlers/MessageUpdate.js index e6daf2bbc..cf3232249 100644 --- a/src/client/websocket/packets/handlers/MessageUpdate.js +++ b/src/client/websocket/packets/handlers/MessageUpdate.js @@ -17,15 +17,11 @@ class MessageUpdateHandler extends AbstractHandler { handle(packet) { let data = packet.d; let client = this.packetManager.client; - let channel = client.store.get('channels', data.channel_id); - if (channel) { - let message = channel.store.get('messages', data.id); - if (message) { - let oldMessage = CloneObject(message); - message.patch(data); - client.emit(Constants.Events.MESSAGE_UPDATE, oldMessage, message); - } + let response = client.actions.MessageUpdate.handle(data); + + if (response.old) { + client.emit(Constants.Events.MESSAGE_UPDATE, response.old, response.updated); } } diff --git a/src/structures/Message.js b/src/structures/Message.js index 826ef049e..d5118ca70 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -72,9 +72,40 @@ class Message { this.id = data.id; } + equals(message, rawData) { + + let embedUpdate = !message.author && !message.attachments; + + if (embedUpdate) { + let base = this.id === message.id && + this.embeds.length === message.embeds.length; + return base; + } else { + let base = this.id === message.id && + this.author.id === message.author.id && + this.content === message.content && + this.tts === message.tts && + this.nonce === message.nonce && + this.embeds.length === message.embeds.length && + this.attachments.length === message.attachments.length; + + if (base && rawData) { + base = this.mentionEveryone === message.mentionEveryone && + this.timestamp.getTime() === new Date(data.timestamp).getTime() && + this.editedTimestamp === new Date(data.edited_timestamp).getTime(); + } + + return base; + } + } + delete() { return this.client.rest.methods.DeleteMessage(this); } + + edit(content) { + return this.client.rest.methods.UpdateMessage(this, content); + } } module.exports = Message; diff --git a/test/random.js b/test/random.js index f38301d9b..915185a7e 100644 --- a/test/random.js +++ b/test/random.js @@ -71,7 +71,7 @@ client.on('typingStop.', (channel, user, data) => { client.on('message', message => { if (message.author.username === 'hydrabolt') { message.channel.sendMessage('test').then(msg => { - msg.delete().catch(console.log); + msg.edit('woah!'); }); } }); From 2d3116d505b0e6ee6ed958eff29704de07e81005 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Tue, 26 Apr 2016 17:44:42 +0100 Subject: [PATCH 026/324] Added guild.createChannel(name, type) --- src/client/actions/ActionsManager.js | 1 + src/client/actions/ChannelCreate.js | 23 +++++++++++++++++++ src/client/rest/RESTMethods.js | 13 +++++++++++ .../packets/handlers/ChannelCreate.js | 6 ++++- src/structures/Guild.js | 4 ++++ test/random.js | 10 ++++---- 6 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 src/client/actions/ChannelCreate.js diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index 0bfc0cc47..d43e82163 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -9,6 +9,7 @@ class ActionsManager { this.register('MessageCreate'); this.register('MessageDelete'); this.register('MessageUpdate'); + this.register('ChannelCreate'); } register(name) { diff --git a/src/client/actions/ChannelCreate.js b/src/client/actions/ChannelCreate.js new file mode 100644 index 000000000..53c1d4325 --- /dev/null +++ b/src/client/actions/ChannelCreate.js @@ -0,0 +1,23 @@ +'use strict'; + +const Action = require('./Action'); +const Constants = require('../../util/Constants'); +const Message = require('../../structures/Message'); + +class ChannelCreateAction extends Action { + + constructor(client) { + super(client); + } + + handle(data) { + let client = this.client; + let channel = client.store.NewChannel(data); + + return { + channel, + }; + } +}; + +module.exports = ChannelCreateAction; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 827861073..8bbb6e579 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -72,6 +72,19 @@ class RESTMethods{ .catch(reject); }); } + + CreateChannel(guild, channelName, channelType) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('post', Constants.Endpoints.GUILD_CHANNELS(guild.id), true, { + name: channelName, + type: channelType, + }) + .then(data => { + resolve(this.rest.client.actions.ChannelCreate.handle(data).channel); + }) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/client/websocket/packets/handlers/ChannelCreate.js b/src/client/websocket/packets/handlers/ChannelCreate.js index d938be358..100b02785 100644 --- a/src/client/websocket/packets/handlers/ChannelCreate.js +++ b/src/client/websocket/packets/handlers/ChannelCreate.js @@ -19,7 +19,11 @@ class ChannelCreateHandler extends AbstractHandler { let data = packet.d; let client = this.packetManager.client; - let channel = client.store.NewChannel(data); + let response = client.actions.ChannelCreate.handle(data); + + if (response.channel) { + client.emit(Constants.Events.CHANNEL_CREATE, response.channel); + } } diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 766cc6955..566f3be0b 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -131,6 +131,10 @@ class Guild { } } + createChannel(name, type) { + return this.client.rest.methods.CreateChannel(this, name, type); + } + get channels() { return this.store.getAsArray('channels'); } get $channels() { return this.store.data.channels; } diff --git a/test/random.js b/test/random.js index 915185a7e..8d6d8a859 100644 --- a/test/random.js +++ b/test/random.js @@ -20,7 +20,7 @@ client.on('guildUpdate', (old, guild) => { console.log(old.name, guild.name); }); client.on('channelCreate', channel => { - console.log(channel); + // console.log(channel); }); client.on('channelDelete', channel => { console.log(channel); @@ -70,9 +70,11 @@ client.on('typingStop.', (channel, user, data) => { client.on('message', message => { if (message.author.username === 'hydrabolt') { - message.channel.sendMessage('test').then(msg => { - msg.edit('woah!'); - }); + if (message.content === 'makechann') { + if (message.channel.guild) { + message.channel.guild.createChannel('hi', 'text').then(console.log); + } + } } }); From b436fac5c45fda59d4755f447f7bed9b980ae11a Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Tue, 26 Apr 2016 17:46:34 +0100 Subject: [PATCH 027/324] Fix presence update bug (#297) --- src/client/websocket/packets/handlers/PresenceUpdate.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/websocket/packets/handlers/PresenceUpdate.js b/src/client/websocket/packets/handlers/PresenceUpdate.js index c472a413c..889017bce 100644 --- a/src/client/websocket/packets/handlers/PresenceUpdate.js +++ b/src/client/websocket/packets/handlers/PresenceUpdate.js @@ -48,7 +48,9 @@ class PresenceUpdateHandler extends AbstractHandler { data.user.username = data.user.username || user.username; data.user.id = data.user.id || user.id; data.user.discriminator = data.user.discriminator || user.discriminator; - data.user.avatar = data.user.avatar || user.avatar; + + // comment out avatar patching as it causes bugs (see #297) + // data.user.avatar = data.user.avatar || user.avatar; data.user.status = data.status || user.status; data.user.game = data.game; From 2341c8363839aefd49798f95c0dffcb18ad33fa7 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Wed, 27 Apr 2016 16:25:57 +0100 Subject: [PATCH 028/324] Added channel.delete() --- src/client/actions/ActionsManager.js | 1 + src/client/actions/ChannelDelete.js | 27 +++++++++++++++++++ src/client/rest/RESTMethods.js | 11 ++++++++ .../packets/handlers/ChannelDelete.js | 6 ++--- src/structures/Channel.js | 4 +++ src/structures/datastore/ClientDataStore.js | 4 --- test/random.js | 6 ++++- 7 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 src/client/actions/ChannelDelete.js diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index d43e82163..eaad74eb0 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -10,6 +10,7 @@ class ActionsManager { this.register('MessageDelete'); this.register('MessageUpdate'); this.register('ChannelCreate'); + this.register('ChannelDelete'); } register(name) { diff --git a/src/client/actions/ChannelDelete.js b/src/client/actions/ChannelDelete.js new file mode 100644 index 000000000..2c07e0019 --- /dev/null +++ b/src/client/actions/ChannelDelete.js @@ -0,0 +1,27 @@ +'use strict'; + +const Action = require('./Action'); +const Constants = require('../../util/Constants'); +const Message = require('../../structures/Message'); + +class ChannelDeleteAction extends Action { + + constructor(client) { + super(client); + } + + handle(data) { + let client = this.client; + let channel = client.store.get('channels', data.id); + + if (channel) { + client.store.KillChannel(channel); + } + + return { + channel, + }; + } +}; + +module.exports = ChannelDeleteAction; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 8bbb6e579..20e3094bb 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -85,6 +85,17 @@ class RESTMethods{ .catch(reject); }); } + + DeleteChannel(channel) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.CHANNEL(channel.id), true) + .then(data => { + data.id = channel.id; + resolve(this.rest.client.actions.ChannelDelete.handle(data).channel); + }) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/client/websocket/packets/handlers/ChannelDelete.js b/src/client/websocket/packets/handlers/ChannelDelete.js index e94d052a0..8a171dc43 100644 --- a/src/client/websocket/packets/handlers/ChannelDelete.js +++ b/src/client/websocket/packets/handlers/ChannelDelete.js @@ -19,10 +19,10 @@ class ChannelDeleteHandler extends AbstractHandler { let data = packet.d; let client = this.packetManager.client; - let channel = client.store.get('channels', data.id); + let response = client.actions.ChannelCreate.handle(data); - if (channel) { - client.store.KillChannel(channel); + if (response.channel) { + client.emit(Constants.Events.CHANNEL_DELETE, response.channel); } } diff --git a/src/structures/Channel.js b/src/structures/Channel.js index 8dc22316f..d6c3a9822 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -17,6 +17,10 @@ class Channel { setup(data) { this.id = data.id; } + + delete() { + return this.client.rest.methods.DeleteChannel(this); + } } module.exports = Channel; diff --git a/src/structures/datastore/ClientDataStore.js b/src/structures/datastore/ClientDataStore.js index 8cae0c97e..d74681891 100644 --- a/src/structures/datastore/ClientDataStore.js +++ b/src/structures/datastore/ClientDataStore.js @@ -87,10 +87,6 @@ class ClientDataStore extends AbstractDataStore{ if (channel instanceof ServerChannel) { channel.guild.store.remove('channels', channel); } - - if (already && this.pastReady) { - this.client.emit(Constants.Events.CHANNEL_DELETE, channel); - } } UpdateGuild(currentGuild, newData) { diff --git a/test/random.js b/test/random.js index 8d6d8a859..b8778a521 100644 --- a/test/random.js +++ b/test/random.js @@ -23,7 +23,7 @@ client.on('channelCreate', channel => { // console.log(channel); }); client.on('channelDelete', channel => { - console.log(channel); + console.log('channDel', channel); }); client.on('channelUpdate', (old, chan) => { @@ -75,6 +75,10 @@ client.on('message', message => { message.channel.guild.createChannel('hi', 'text').then(console.log); } } + + if (message.content === 'delchann') { + message.channel.delete(); + } } }); From 90cf78775970a74aa76febf0bc97caaa29e0082b Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sat, 30 Apr 2016 18:22:09 +0100 Subject: [PATCH 029/324] I think I got ChannelUpdate working?? --- src/client/actions/ActionsManager.js | 1 + src/client/actions/ChannelUpdate.js | 39 ++++++++++++ src/client/actions/MessageUpdate.js | 6 ++ src/client/rest/RESTMethods.js | 15 +++++ .../packets/handlers/ChannelUpdate.js | 7 +-- .../packets/handlers/MessageUpdate.js | 4 -- src/structures/ServerChannel.js | 61 ++++++++++++++++++- src/structures/datastore/ClientDataStore.js | 1 - test/random.js | 8 +++ 9 files changed, 130 insertions(+), 12 deletions(-) create mode 100644 src/client/actions/ChannelUpdate.js diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index eaad74eb0..8e4032eed 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -11,6 +11,7 @@ class ActionsManager { this.register('MessageUpdate'); this.register('ChannelCreate'); this.register('ChannelDelete'); + this.register('ChannelUpdate'); } register(name) { diff --git a/src/client/actions/ChannelUpdate.js b/src/client/actions/ChannelUpdate.js new file mode 100644 index 000000000..78d02245e --- /dev/null +++ b/src/client/actions/ChannelUpdate.js @@ -0,0 +1,39 @@ +'use strict'; + +const Action = require('./Action'); +const Constants = require('../../util/Constants'); +const CloneObject = require('../../util/CloneObject'); +const Message = require('../../structures/Message'); + +class ChannelUpdateAction extends Action { + + constructor(client) { + super(client); + } + + handle(data) { + + let client = this.client; + let channel = client.store.get('channels', data.id); + + if (channel) { + let oldChannel = CloneObject(channel); + channel.setup(data); + if (!oldChannel.equals(data)) { + client.emit(Constants.Events.CHANNEL_UPDATE, oldChannel, channel); + } + + return { + old: oldChannel, + updated: channel, + }; + } + + return { + old: null, + updated: null, + }; + } +}; + +module.exports = ChannelUpdateAction; diff --git a/src/client/actions/MessageUpdate.js b/src/client/actions/MessageUpdate.js index 13b414fe4..67c1d79f6 100644 --- a/src/client/actions/MessageUpdate.js +++ b/src/client/actions/MessageUpdate.js @@ -25,7 +25,13 @@ class MessageUpdateAction extends Action { old: oldMessage, updated: message, }; + client.emit(Constants.Events.MESSAGE_UPDATE, oldMessage, message); } + + return { + old: message, + updated: message, + }; } return { diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 20e3094bb..7311aa55a 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -96,6 +96,21 @@ class RESTMethods{ .catch(reject); }); } + + UpdateChannel(channel, data) { + return new Promise((resolve, reject) => { + data.name = (data.name || channel.name).trim(); + data.topic = data.topic || channel.topic; + data.position = data.position || channel.position; + data.bitrate = data.bitrate || channel.bitrate; + + this.rest.makeRequest('patch', Constants.Endpoints.CHANNEL(channel.id), true, data) + .then(data => { + resolve(this.rest.client.actions.ChannelUpdate.handle(data).updated); + }) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/client/websocket/packets/handlers/ChannelUpdate.js b/src/client/websocket/packets/handlers/ChannelUpdate.js index d44a15855..699cfd432 100644 --- a/src/client/websocket/packets/handlers/ChannelUpdate.js +++ b/src/client/websocket/packets/handlers/ChannelUpdate.js @@ -20,12 +20,7 @@ class ChannelUpdateHandler extends AbstractHandler { let data = packet.d; let client = this.packetManager.client; - let channel = client.store.get('channels', data.id); - - if (channel) { - client.store.UpdateChannel(channel, data); - } - + client.actions.ChannelUpdate.handle(data); } }; diff --git a/src/client/websocket/packets/handlers/MessageUpdate.js b/src/client/websocket/packets/handlers/MessageUpdate.js index cf3232249..69ac2aa3a 100644 --- a/src/client/websocket/packets/handlers/MessageUpdate.js +++ b/src/client/websocket/packets/handlers/MessageUpdate.js @@ -20,10 +20,6 @@ class MessageUpdateHandler extends AbstractHandler { let response = client.actions.MessageUpdate.handle(data); - if (response.old) { - client.emit(Constants.Events.MESSAGE_UPDATE, response.old, response.updated); - } - } }; diff --git a/src/structures/ServerChannel.js b/src/structures/ServerChannel.js index ebd7ea8b6..d5133a4a6 100644 --- a/src/structures/ServerChannel.js +++ b/src/structures/ServerChannel.js @@ -5,6 +5,19 @@ const PermissionOverwrites = require('./PermissionOverwrites'); const EvaluatedPermissions = require('./EvaluatedPermissions'); const Constants = require('../util/Constants'); +function arraysEqual(a, b) { + if (a === b) return true; + + for (let itemInd in a) { + let ind = b.indexOf(item); + if (ind) { + b.splice(ind, 1); + } + } + + return b.length === 0; +} + class ServerChannel extends Channel{ constructor(guild, data) { super(guild.client, data, guild); @@ -18,14 +31,40 @@ class ServerChannel extends Channel{ this.name = data.name; this.lastMessageID = data.last_message_id; this.ow = data.permission_overwrites; + this.permissionOverwrites = []; if (data.permission_overwrites) { - this.permissionOverwrites = []; for (let overwrite of data.permission_overwrites) { this.permissionOverwrites.push(new PermissionOverwrites(this, overwrite)); } } } + equals(other) { + let base = ( + this.type === other.type && + this.topic === other.topic && + this.position === other.position && + this.name === other.name && + this.id === other.id + ); + + if (base) { + if (other.permission_overwrites && other.permission_overwrites.length === this.permissionOverwrites.length) { + let thisIDSet = this.permissionOverwrites.map(overwrite => overwrite.id); + let otherIDSet = other.permission_overwrites.map(overwrite => overwrite.id); + if (arraysEqual(thisIDSet, otherIDSet)) { + base = true; + } else { + base = false; + } + } else { + base = false; + } + } + + return base; + } + permissionsFor(member) { member = this.client.resolver.ResolveGuildMember(this.guild, member); if (member) { @@ -82,6 +121,26 @@ class ServerChannel extends Channel{ return []; } + edit(data) { + return this.client.rest.methods.UpdateChannel(this, data); + } + + setName(name) { + return this.client.rest.methods.UpdateChannel(this, { name, }); + } + + setPosition(position) { + return this.rest.client.rest.methods.UpdateChannel(this, { position, }); + } + + setTopic(topic) { + return this.rest.client.rest.methods.UpdateChannel(this, { topic, }); + } + + setBitrate() { + return this.rest.client.rest.methods.UpdateChannel(this, { bitrate, }); + } + toString() { return this.name; } diff --git a/src/structures/datastore/ClientDataStore.js b/src/structures/datastore/ClientDataStore.js index d74681891..15f359d6a 100644 --- a/src/structures/datastore/ClientDataStore.js +++ b/src/structures/datastore/ClientDataStore.js @@ -100,7 +100,6 @@ class ClientDataStore extends AbstractDataStore{ UpdateChannel(currentChannel, newData) { let oldChannel = CloneObject(currentChannel); currentChannel.setup(newData); - this.client.emit(Constants.Events.CHANNEL_UPDATE, oldChannel, currentChannel); } } diff --git a/test/random.js b/test/random.js index b8778a521..03c244535 100644 --- a/test/random.js +++ b/test/random.js @@ -79,9 +79,17 @@ client.on('message', message => { if (message.content === 'delchann') { message.channel.delete(); } + + if (message.content.startsWith('setname')) { + message.channel.setName(message.content.substr(8)).then(chanLoop).catch(console.log); + } } }); +function chanLoop(channel) { + channel.setName(channel.name + 'a').then(chanLoop).catch(console.log); +} + client.on('messageDelete', message => { console.log('Message deleted by', message.author.username); }); From 3a0426482e0e7043906c633eb9896bdafa9ccc1e Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sat, 30 Apr 2016 18:27:34 +0100 Subject: [PATCH 030/324] update TODO list --- TODO.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TODO.md b/TODO.md index e11806d5d..19bac313b 100644 --- a/TODO.md +++ b/TODO.md @@ -8,9 +8,9 @@ - [ ] leaving guilds - [ ] deleting guilds - [ ] _joining guilds_ -- [ ] creating channels -- [ ] updating channels -- [ ] deleting channels +- [x] creating channels +- [x] updating channels +- [x] deleting channels - [ ] making roles - [ ] deleting roles - [ ] updating roles From f95c588d875c4b5fab0ed9831383205941c32aca Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 1 May 2016 14:51:46 +0100 Subject: [PATCH 031/324] Added Guild Deletion --- TODO.md | 4 +- src/client/actions/ActionsManager.js | 1 + src/client/actions/ChannelDelete.js | 17 ++++++ src/client/actions/GuildDelete.js | 54 +++++++++++++++++++ src/client/actions/MessageDelete.js | 19 +++++-- src/client/rest/RESTMethods.js | 21 ++++++++ .../packets/handlers/ChannelDelete.js | 2 +- .../websocket/packets/handlers/GuildDelete.js | 17 ++---- src/structures/Guild.js | 8 +++ src/structures/ServerChannel.js | 1 + src/structures/datastore/ClientDataStore.js | 1 - test/random.js | 10 ++-- 12 files changed, 129 insertions(+), 26 deletions(-) create mode 100644 src/client/actions/GuildDelete.js diff --git a/TODO.md b/TODO.md index 19bac313b..0f2f60e58 100644 --- a/TODO.md +++ b/TODO.md @@ -5,8 +5,8 @@ - [ ] updating user details - [x] deleting messages - [x] updating messages -- [ ] leaving guilds -- [ ] deleting guilds +- [x] leaving guilds +- [x] deleting guilds - [ ] _joining guilds_ - [x] creating channels - [x] updating channels diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index 8e4032eed..ed711b5fa 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -12,6 +12,7 @@ class ActionsManager { this.register('ChannelCreate'); this.register('ChannelDelete'); this.register('ChannelUpdate'); + this.register('GuildDelete'); } register(name) { diff --git a/src/client/actions/ChannelDelete.js b/src/client/actions/ChannelDelete.js index 2c07e0019..4f021d0ed 100644 --- a/src/client/actions/ChannelDelete.js +++ b/src/client/actions/ChannelDelete.js @@ -8,6 +8,8 @@ class ChannelDeleteAction extends Action { constructor(client) { super(client); + this.timeouts = []; + this.deleted = {}; } handle(data) { @@ -15,13 +17,28 @@ class ChannelDeleteAction extends Action { let channel = client.store.get('channels', data.id); if (channel) { + client.store.KillChannel(channel); + this.deleted[channel.id] = channel; + this.scheduleForDeletion(channel.id); + + } else if (this.deleted[data.id]) { + + channel = this.deleted[data.id]; + } return { channel, }; } + + scheduleForDeletion(id) { + this.timeouts.push( + setTimeout(() => delete this.deleted[id], + this.client.options.rest_ws_bridge_timeout) + ); + } }; module.exports = ChannelDeleteAction; diff --git a/src/client/actions/GuildDelete.js b/src/client/actions/GuildDelete.js new file mode 100644 index 000000000..271cb7b52 --- /dev/null +++ b/src/client/actions/GuildDelete.js @@ -0,0 +1,54 @@ +'use strict'; + +const Action = require('./Action'); +const Constants = require('../../util/Constants'); +const Message = require('../../structures/Message'); + +class GuildDeleteAction extends Action { + + constructor(client) { + super(client); + this.deleted = {}; + this.timeouts = []; + } + + handle(data) { + + let client = this.client; + let guild = client.store.get('guilds', data.id); + + if (guild) { + if (guild.available && data.unavailable) { + // guild is unavailable + guild.available = false; + client.emit(Constants.Events.GUILD_UNAVAILABLE, guild); + + // stops the GuildDelete packet thinking a guild was actually deleted, + // handles emitting of event itself + return { + guild: null, + }; + } else { + // delete guild + client.store.remove('guilds', guild); + this.deleted[guild.id] = guild; + this.scheduleForDeletion(guild.id); + } + } else if (this.deleted[data.id]) { + guild = this.deleted[data.id]; + } + + return { + guild, + }; + } + + scheduleForDeletion(id) { + this.timeouts.push( + setTimeout(() => delete this.deleted[id], + this.client.options.rest_ws_bridge_timeout) + ); + } +}; + +module.exports = GuildDeleteAction; diff --git a/src/client/actions/MessageDelete.js b/src/client/actions/MessageDelete.js index 9f82f0a15..a8a2f8e04 100644 --- a/src/client/actions/MessageDelete.js +++ b/src/client/actions/MessageDelete.js @@ -9,6 +9,7 @@ class MessageDeleteAction extends Action { constructor(client) { super(client); this.timeouts = []; + this.deleted = {}; } handle(data) { @@ -16,9 +17,17 @@ class MessageDeleteAction extends Action { let channel = client.store.get('channels', data.channel_id); if (channel) { let message = channel.store.get('messages', data.id); - if (message && !message._deleted) { - message._deleted = true; - this.scheduleForDeletion(channel, message.id); + + if (message) { + + channel.store.remove('messages', message.id); + this.deleted[channel.id + message.id] = message; + this.scheduleForDeletion(channel.id, message.id); + + } else if (this.deleted[channel.id + data.id]) { + + message = this.deleted[channel.id + data.id]; + } return { @@ -31,9 +40,9 @@ class MessageDeleteAction extends Action { }; } - scheduleForDeletion(channel, id) { + scheduleForDeletion(channelID, messageID) { this.timeouts.push( - setTimeout(() => channel.store.remove('messages', id), + setTimeout(() => delete this.deleted[channelID + messageID], this.client.options.rest_ws_bridge_timeout) ); } diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 7311aa55a..d175dcf67 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -111,6 +111,27 @@ class RESTMethods{ .catch(reject); }); } + + LeaveGuild(guild) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.ME_GUILD(guild.id), true) + .then(() => { + resolve(this.rest.client.actions.GuildDelete.handle({ id:guild.id }).guild); + }) + .catch(reject); + }); + } + + // untested but probably will work + DeleteGuild(guild) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.GUILD(guild.id), true) + .then(() => { + resolve(this.rest.client.actions.GuildDelete.handle({ id:guild.id }).guild); + }) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/client/websocket/packets/handlers/ChannelDelete.js b/src/client/websocket/packets/handlers/ChannelDelete.js index 8a171dc43..82a6eed6f 100644 --- a/src/client/websocket/packets/handlers/ChannelDelete.js +++ b/src/client/websocket/packets/handlers/ChannelDelete.js @@ -19,7 +19,7 @@ class ChannelDeleteHandler extends AbstractHandler { let data = packet.d; let client = this.packetManager.client; - let response = client.actions.ChannelCreate.handle(data); + let response = client.actions.ChannelDelete.handle(data); if (response.channel) { client.emit(Constants.Events.CHANNEL_DELETE, response.channel); diff --git a/src/client/websocket/packets/handlers/GuildDelete.js b/src/client/websocket/packets/handlers/GuildDelete.js index 350c27b1c..05319a5cb 100644 --- a/src/client/websocket/packets/handlers/GuildDelete.js +++ b/src/client/websocket/packets/handlers/GuildDelete.js @@ -18,21 +18,10 @@ class GuildDeleteHandler extends AbstractHandler { let data = packet.d; let client = this.packetManager.client; - let guild = client.store.get('guilds', data.id); + let response = client.actions.GuildDelete.handle(data); - if (guild) { - if (guild.available && data.unavailable) { - // guild is unavailable - guild.available = false; - client.emit(Constants.Events.GUILD_UNAVAILABLE, guild); - } else { - // delete guild - client.store.KillGuild(guild); - this.packetManager.ws.checkIfReady(); - } - } else { - // it's not there! :( - client.emit('warn', 'guild deleted but not cached in first place. missed packet?'); + if (response.guild) { + client.emit(Constants.Events.GUILD_DELETE, response.guild); } } diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 566f3be0b..add9d37ed 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -135,6 +135,14 @@ class Guild { return this.client.rest.methods.CreateChannel(this, name, type); } + leave() { + return this.client.rest.methods.LeaveGuild(this); + } + + delete() { + return this.client.rest.methods.DeleteGuild(this); + } + get channels() { return this.store.getAsArray('channels'); } get $channels() { return this.store.data.channels; } diff --git a/src/structures/ServerChannel.js b/src/structures/ServerChannel.js index d5133a4a6..f15f1b613 100644 --- a/src/structures/ServerChannel.js +++ b/src/structures/ServerChannel.js @@ -9,6 +9,7 @@ function arraysEqual(a, b) { if (a === b) return true; for (let itemInd in a) { + let item = a[itemInd]; let ind = b.indexOf(item); if (ind) { b.splice(ind, 1); diff --git a/src/structures/datastore/ClientDataStore.js b/src/structures/datastore/ClientDataStore.js index 15f359d6a..cdcbdc2e3 100644 --- a/src/structures/datastore/ClientDataStore.js +++ b/src/structures/datastore/ClientDataStore.js @@ -82,7 +82,6 @@ class ClientDataStore extends AbstractDataStore{ } KillChannel(channel) { - let already = this.get('channels', channel.id); this.remove('channels', channel); if (channel instanceof ServerChannel) { channel.guild.store.remove('channels', channel); diff --git a/test/random.js b/test/random.js index 03c244535..9f4b6879d 100644 --- a/test/random.js +++ b/test/random.js @@ -14,7 +14,7 @@ client.on('guildCreate', (guild) => { console.log(guild); }); client.on('guildDelete', (guild) => { - console.log(guild); + console.log('guilddel', guild.name); }); client.on('guildUpdate', (old, guild) => { console.log(old.name, guild.name); @@ -23,7 +23,7 @@ client.on('channelCreate', channel => { // console.log(channel); }); client.on('channelDelete', channel => { - console.log('channDel', channel); + console.log('channDel', channel.name); }); client.on('channelUpdate', (old, chan) => { @@ -77,12 +77,16 @@ client.on('message', message => { } if (message.content === 'delchann') { - message.channel.delete(); + message.channel.delete().then(chan => console.log('selfDelChann', chan.name)); } if (message.content.startsWith('setname')) { message.channel.setName(message.content.substr(8)).then(chanLoop).catch(console.log); } + + if (message.content === 'leave') { + message.guild.leave().then(guild => console.log('left guild', guild.name)).catch(console.log); + } } }); From ebfc2169d54dc7722b6fdaed0c8843160fae0abf Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 1 May 2016 21:12:42 +0100 Subject: [PATCH 032/324] Added ClientUser modification support --- src/client/Client.js | 4 ++ src/client/ClientDataResolver.js | 7 +++ src/client/actions/ActionsManager.js | 1 + src/client/actions/UserUpdate.js | 44 +++++++++++++++++++ src/client/rest/RESTMethods.js | 22 +++++++++- .../websocket/packets/handlers/UserUpdate.js | 18 +------- src/structures/ClientUser.js | 20 +++++++++ src/structures/User.js | 26 ++++++++++- src/structures/datastore/ClientDataStore.js | 2 + test/random.js | 18 ++++++++ 10 files changed, 143 insertions(+), 19 deletions(-) create mode 100644 src/client/actions/UserUpdate.js diff --git a/src/client/Client.js b/src/client/Client.js index d48f6c2a8..b51ac03e6 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -33,6 +33,10 @@ class Client extends EventEmitter{ } } + get user() { + return this.store.user; + } + } module.exports = Client; diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index 47ee3f9fc..8f8cd6d22 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -54,6 +54,13 @@ class ClientDataResolver { return guild.store.get('members', user.id); } + + ResolveBase64(data) { + if (data instanceof Buffer) { + return 'data:image/jpg;base64,' + data.toString('base64'); + } + return data; + } } module.exports = ClientDataResolver; diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index ed711b5fa..9b1ed9256 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -13,6 +13,7 @@ class ActionsManager { this.register('ChannelDelete'); this.register('ChannelUpdate'); this.register('GuildDelete'); + this.register('UserUpdate'); } register(name) { diff --git a/src/client/actions/UserUpdate.js b/src/client/actions/UserUpdate.js new file mode 100644 index 000000000..ec3a42cb6 --- /dev/null +++ b/src/client/actions/UserUpdate.js @@ -0,0 +1,44 @@ +'use strict'; + +const Action = require('./Action'); +const Constants = require('../../util/Constants'); +const CloneObject = require('../../util/CloneObject'); +const Message = require('../../structures/Message'); + +class UserUpdateAction extends Action { + + constructor(client) { + super(client); + } + + handle(data) { + + let client = this.client; + + if (client.store.user) { + if (client.store.user.equals(data)) { + return { + old: client.store.user, + updated: client.store.user, + }; + } + + let oldUser = CloneObject(client.store.user); + client.store.user.setup(data); + + client.emit(Constants.Events.USER_UPDATE, oldUser, client.store.user); + + return { + old: oldUser, + updated: client.store.user, + }; + } + + return { + old: null, + updated: null, + }; + } +}; + +module.exports = UserUpdateAction; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index d175dcf67..2a3a54176 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -12,7 +12,8 @@ class RESTMethods{ LoginEmailPassword(email, password) { return new Promise((resolve, reject) => { - + this.rest.client.store.email = email; + this.rest.client.store.password = password; this.rest.makeRequest('post', Constants.Endpoints.LOGIN, false, { email, password }) .then(data => { this.rest.client.manager.connectToWebSocket(data.token, resolve, reject); @@ -132,6 +133,25 @@ class RESTMethods{ .catch(reject); }); } + + UpdateCurrentUser(_data) { + return new Promise((resolve, reject) => { + let user = this.rest.client.store.user; + let data = {}; + + data.username = _data.username || user.username; + data.avatar = this.rest.client.resolver.ResolveBase64(_data.avatar) || user.avatar; + if (!user.bot) { + data.password = this.rest.client.store.password; + data.email = _data.email || this.rest.client.store.email; + data.new_password = _data.newPassword; + } + + this.rest.makeRequest('patch', Constants.Endpoints.ME, true, data) + .then(data => resolve(this.rest.client.actions.UserUpdate.handle(data).updated)) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/client/websocket/packets/handlers/UserUpdate.js b/src/client/websocket/packets/handlers/UserUpdate.js index d8bc1f7cc..8cefe8fcd 100644 --- a/src/client/websocket/packets/handlers/UserUpdate.js +++ b/src/client/websocket/packets/handlers/UserUpdate.js @@ -3,6 +3,7 @@ const AbstractHandler = require('./AbstractHandler'); const Structure = name => require(`../../../../structures/${name}`); const CloneObject = name => require(`../../../../util/CloneObject`); +const Constants = require(`../../../../util/Constants`); const ClientUser = Structure('ClientUser'); const Guild = Structure('Guild'); @@ -18,22 +19,7 @@ class UserUpdateHandler extends AbstractHandler { let data = packet.d; let client = this.packetManager.client; - let user = client.store.user; - - if (!user) { - return; - } - - let oldUser = CloneObject(user); - - user.username = data.username || user.username; - user.id = data.id || user.id; - user.avatar = data.avatar || user.avatar; - user.discriminator = data.discriminator || user.discriminator; - user.email = data.email || user.email; - user.verified = data.verified || user.verified; - - client.emit(Constants.Events.USER_UPDATE, oldUser, user); + let response = client.actions.UserUpdate.handle(data); } diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 19b84d5b8..923c571dd 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -12,6 +12,26 @@ class ClientUser extends User { this.verified = data.verified; this.email = data.email; } + + setUsername(username) { + return this.client.rest.methods.UpdateCurrentUser({ username, }); + } + + setEmail(email) { + return this.client.rest.methods.UpdateCurrentUser({ email, }); + } + + setPassword(password) { + return this.client.rest.methods.UpdateCurrentUser({ password, }); + } + + setAvatar(avatar) { + return this.client.rest.methods.UpdateCurrentUser({ avatar, }); + } + + edit(data) { + return this.client.rest.methods.UpdateCurrentUser(data); + } } module.exports = ClientUser; diff --git a/src/structures/User.js b/src/structures/User.js index 6cae4518b..4d48aed5a 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -14,13 +14,35 @@ class User { this.discriminator = data.discriminator; this.avatar = data.avatar; this.bot = Boolean(data.bot); - this.status = data.status || 'offline'; - this.game = data.game; + this.status = data.status || this.status || 'offline'; + this.game = data.game || this.game; } toString() { return `<@${this.id}>`; } + + equals(user) { + let base = ( + this.username === user.username && + this.id === user.id && + this.discriminator === user.discriminator && + this.avatar === user.avatar && + this.bot === Boolean(user.bot) + ); + + if (base) { + if (user.status) { + base = this.status === user.status; + } + + if (user.game) { + base = this.game === user.game; + } + } + + return base; + } } module.exports = User; diff --git a/src/structures/datastore/ClientDataStore.js b/src/structures/datastore/ClientDataStore.js index cdcbdc2e3..a7b39c19d 100644 --- a/src/structures/datastore/ClientDataStore.js +++ b/src/structures/datastore/ClientDataStore.js @@ -18,6 +18,8 @@ class ClientDataStore extends AbstractDataStore{ this.token = null; this.session = null; this.user = null; + this.email = null; + this.password = null; this.register('users'); this.register('guilds'); diff --git a/test/random.js b/test/random.js index 9f4b6879d..194fe13da 100644 --- a/test/random.js +++ b/test/random.js @@ -1,6 +1,7 @@ 'use strict'; const Discord = require('../'); +const request = require('superagent'); let client = new Discord.Client(); @@ -84,12 +85,29 @@ client.on('message', message => { message.channel.setName(message.content.substr(8)).then(chanLoop).catch(console.log); } + if (message.content.startsWith('botname')) { + client.user.setUsername(message.content.substr(8)).then(nameLoop).catch(console.log); + } + + if (message.content.startsWith('botavatar')) { + request + .get('url') + .end((err, res) => { + client.user.setAvatar(res.body).catch(console.log) + .then(user => message.channel.sendMessage('Done!')); + }); + } + if (message.content === 'leave') { message.guild.leave().then(guild => console.log('left guild', guild.name)).catch(console.log); } } }); +function nameLoop(user) { + user.setUsername(user.username + 'a').then(nameLoop).catch(console.log); +} + function chanLoop(channel) { channel.setName(channel.name + 'a').then(chanLoop).catch(console.log); } From a0418a2551e1df8dba3b84921a707b54efe1cf18 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 1 May 2016 21:14:23 +0100 Subject: [PATCH 033/324] update TODO list whoops --- TODO.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 0f2f60e58..14fbd65ca 100644 --- a/TODO.md +++ b/TODO.md @@ -2,7 +2,7 @@ - [x] sending messages - [x] sending tts messages - [ ] sending files -- [ ] updating user details +- [x] updating user details - [x] deleting messages - [x] updating messages - [x] leaving guilds @@ -30,4 +30,5 @@ - [ ] updating invites - [ ] deleting invites - [ ] getting invites -- [ ] typing simulation \ No newline at end of file +- [ ] typing simulation +- [ ] guild modification \ No newline at end of file From 82ac3d1c444701b10a6f18852b4c12a621a3dcae Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Mon, 2 May 2016 13:07:55 +0100 Subject: [PATCH 034/324] Remove TODO list, now tracked by issue #313 --- TODO.md | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 TODO.md diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 14fbd65ca..000000000 --- a/TODO.md +++ /dev/null @@ -1,34 +0,0 @@ -# To-do list: -- [x] sending messages -- [x] sending tts messages -- [ ] sending files -- [x] updating user details -- [x] deleting messages -- [x] updating messages -- [x] leaving guilds -- [x] deleting guilds -- [ ] _joining guilds_ -- [x] creating channels -- [x] updating channels -- [x] deleting channels -- [ ] making roles -- [ ] deleting roles -- [ ] updating roles -- [ ] logging out -- [ ] modifying channel overwrites -- [ ] fetching guild members -- [ ] getting channel logs -- [ ] getting bans -- [ ] banning members -- [ ] unbanning members -- [ ] kicking members -- [ ] moving voice channel members -- [ ] muting/deafening voice channel members -- [ ] voice support -- [ ] adding members to roles -- [ ] creating invites -- [ ] updating invites -- [ ] deleting invites -- [ ] getting invites -- [ ] typing simulation -- [ ] guild modification \ No newline at end of file From ab1737524821d2ad4a2176a7184ffbe1d68ae404 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Tue, 3 May 2016 16:42:38 +0100 Subject: [PATCH 035/324] Added GuildUpdate handling, and setting guilds details --- src/client/ClientDataResolver.js | 24 ++++++ src/client/actions/ActionsManager.js | 1 + src/client/actions/GuildUpdate.js | 42 ++++++++++ src/client/rest/RESTMethods.js | 47 +++++++++++ .../websocket/packets/handlers/GuildUpdate.js | 6 +- src/structures/Guild.js | 82 ++++++++++++++++++- src/structures/ServerChannel.js | 3 +- test/random.js | 21 ++++- 8 files changed, 215 insertions(+), 11 deletions(-) create mode 100644 src/client/actions/GuildUpdate.js diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index 8f8cd6d22..fc65010cf 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -5,6 +5,7 @@ const Structure = name => require(`../structures/${name}`); const User = Structure('User'); const Message = Structure('Message'); const Guild = Structure('Guild'); +const Channel = Structure('Channel'); const ServerChannel = Structure('ServerChannel'); const TextChannel = Structure('TextChannel'); const VoiceChannel = Structure('VoiceChannel'); @@ -59,8 +60,31 @@ class ClientDataResolver { if (data instanceof Buffer) { return 'data:image/jpg;base64,' + data.toString('base64'); } + return data; } + + ResolveChannel(channel) { + if (channel instanceof Channel) { + return channel; + } + + if ($string(channel)) { + return this.client.store.get('channels', channel); + } + } + + ResolveString(data) { + if (data instanceof String) { + return data; + } + + if (data instanceof Array) { + return data.join('\n'); + } + + return String(data); + } } module.exports = ClientDataResolver; diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index 9b1ed9256..41d5be9de 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -13,6 +13,7 @@ class ActionsManager { this.register('ChannelDelete'); this.register('ChannelUpdate'); this.register('GuildDelete'); + this.register('GuildUpdate'); this.register('UserUpdate'); } diff --git a/src/client/actions/GuildUpdate.js b/src/client/actions/GuildUpdate.js new file mode 100644 index 000000000..96ab7565e --- /dev/null +++ b/src/client/actions/GuildUpdate.js @@ -0,0 +1,42 @@ +'use strict'; + +const Action = require('./Action'); +const Constants = require('../../util/Constants'); +const CloneObject = require('../../util/CloneObject'); +const Message = require('../../structures/Message'); + +class GuildUpdateAction extends Action { + + constructor(client) { + super(client); + this.deleted = {}; + this.timeouts = []; + } + + handle(data) { + + let client = this.client; + let guild = client.store.get('guilds', data.id); + + if (guild) { + let oldGuild = CloneObject(guild); + guild.setup(data); + + if (!oldGuild.equals(data)) { + client.emit(Constants.Events.GUILD_UPDATE, oldGuild, guild); + } + + return { + old: oldGuild, + updated: guild, + }; + } + + return { + old: null, + updated: null, + }; + } +}; + +module.exports = GuildUpdateAction; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 2a3a54176..810b3df58 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -152,6 +152,53 @@ class RESTMethods{ .catch(reject); }); } + + UpdateGuild(guild, _data) { + return new Promise((resolve, reject) => { + /* + can contain: + name, region, verificationLevel, afkChannel, afkTimeout, icon, owner, splash + */ + + let data = {}; + + if (_data.name) { + data.name = _data.name; + } + + if (_data.region) { + data.region = _data.region; + } + + if (_data.verificationLevel) { + data.verification_level = Number(_data.verificationLevel); + } + + if (_data.afkChannel) { + data.afk_channel_id = this.rest.client.resolver.ResolveChannel(_data.afkChannel).id; + } + + if (_data.afkTimeout) { + data.afk_timeout = Number(_data.afkTimeout); + } + + if (_data.icon) { + data.icon = this.rest.client.resolver.ResolveBase64(_data.icon); + } + + if (_data.owner) { + data.owner_id = this.rest.client.resolver.ResolveUser(_data.owner).id; + } + + if (_data.splash) { + data.splash = this.rest.client.resolver.ResolveBase64(_data.splash); + } + + this.rest.makeRequest('patch', Constants.Endpoints.GUILD(guild.id), true, data) + .then(data => resolve(this.rest.client.actions.GuildUpdate.handle(data).updated)) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/client/websocket/packets/handlers/GuildUpdate.js b/src/client/websocket/packets/handlers/GuildUpdate.js index e74effbfc..7a44eaabc 100644 --- a/src/client/websocket/packets/handlers/GuildUpdate.js +++ b/src/client/websocket/packets/handlers/GuildUpdate.js @@ -19,11 +19,7 @@ class GuildUpdateHandler extends AbstractHandler { let data = packet.d; let client = this.packetManager.client; - let guild = client.store.get('guilds', data.id); - - if (guild) { - client.store.UpdateGuild(guild, data); - } + let response = client.actions.GuildUpdate.handle(data); } diff --git a/src/structures/Guild.js b/src/structures/Guild.js index add9d37ed..1d5e71a6d 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -8,6 +8,21 @@ const VoiceChannel = require('./VoiceChannel'); const Constants = require('../Util/Constants'); const Role = require('./Role'); +function arraysEqual(a, b) { + if (a === b) return true; + if (a.length !== b.length) return false; + + for (let itemInd in a) { + let item = a[itemInd]; + let ind = b.indexOf(item); + if (ind) { + b.splice(ind, 1); + } + } + + return b.length === 0; +} + class Guild { constructor(client, data) { this.client = client; @@ -64,6 +79,34 @@ class Guild { return this.client.resolver.ResolveGuildMember(this, user); } + equals(data) { + let base = + this.id === data.id && + this.available === !data.unavailable && + this.splash === data.splash && + this.region === data.region && + this.name === data.name && + this.memberCount === data.member_count && + this.large === data.large && + this.icon === data.icon && + arraysEqual(this.features, data.features) && + this.owner.id === data.owner_id && + this.verificationLevel === data.verification_level && + this.embedEnabled === data.embed_enabled; + + if (base) { + if (this.embedChannel) { + if (this.embedChannel.id !== data.embed_channel_id) { + base = false; + } + } else if (data.embed_channel_id) { + base = false; + } + } + + return base; + } + setup(data) { this.id = data.id; this.available = !data.unavailable; @@ -79,7 +122,6 @@ class Guild { this.afkTimeout = data.afk_timeout; this.afkChannelID = data.afk_channel_id; this.embedEnabled = data.embed_enabled; - this.embedChannelID = data.embed_channel_id; this.verificationLevel = data.verification_level; this.features = data.features || []; @@ -99,6 +141,8 @@ class Guild { } } + this.embedChannel = this.store.get('channels', data.embed_channel_id); + if (data.roles) { this.store.clear('roles'); for (let role of data.roles) { @@ -143,6 +187,42 @@ class Guild { return this.client.rest.methods.DeleteGuild(this); } + edit(data) { + return this.client.rest.methods.UpdateGuild(this, data); + } + + setName(name) { + return this.edit({ name, }); + } + + setRegion(region) { + return this.edit({ region, }); + } + + setVerificationLevel(verificationLevel) { + return this.edit({ verificationLevel, }); + } + + setAFKChannel(afkchannel) { + return this.edit({ afkChannel, }); + } + + setAFKTimeout(afkTimeout) { + return this.edit({ afkTimeout, }); + } + + setIcon(icon) { + return this.edit({ icon, }); + } + + setOwner(owner) { + return this.edit({ owner, }); + } + + setSplash(splash) { + return this.edit({ splash, }); + } + get channels() { return this.store.getAsArray('channels'); } get $channels() { return this.store.data.channels; } diff --git a/src/structures/ServerChannel.js b/src/structures/ServerChannel.js index f15f1b613..3ff271477 100644 --- a/src/structures/ServerChannel.js +++ b/src/structures/ServerChannel.js @@ -7,6 +7,7 @@ const Constants = require('../util/Constants'); function arraysEqual(a, b) { if (a === b) return true; + if (a.length !== b.length) return false; for (let itemInd in a) { let item = a[itemInd]; @@ -50,7 +51,7 @@ class ServerChannel extends Channel{ ); if (base) { - if (other.permission_overwrites && other.permission_overwrites.length === this.permissionOverwrites.length) { + if (other.permission_overwrites) { let thisIDSet = this.permissionOverwrites.map(overwrite => overwrite.id); let otherIDSet = other.permission_overwrites.map(overwrite => overwrite.id); if (arraysEqual(thisIDSet, otherIDSet)) { diff --git a/test/random.js b/test/random.js index 194fe13da..656986c42 100644 --- a/test/random.js +++ b/test/random.js @@ -18,7 +18,7 @@ client.on('guildDelete', (guild) => { console.log('guilddel', guild.name); }); client.on('guildUpdate', (old, guild) => { - console.log(old.name, guild.name); + console.log('guildupdate', old.name, guild.name); }); client.on('channelCreate', channel => { // console.log(channel); @@ -82,11 +82,11 @@ client.on('message', message => { } if (message.content.startsWith('setname')) { - message.channel.setName(message.content.substr(8)).then(chanLoop).catch(console.log); + message.channel.setName(message.content.substr(8)); } if (message.content.startsWith('botname')) { - client.user.setUsername(message.content.substr(8)).then(nameLoop).catch(console.log); + client.user.setUsername(message.content.substr(8)); } if (message.content.startsWith('botavatar')) { @@ -98,14 +98,27 @@ client.on('message', message => { }); } + if (message.content.startsWith('gn')) { + message.guild.setName(message.content.substr(3)) + .then(guild => console.log('guild updated to', guild.name)) + .catch(console.log); + } + if (message.content === 'leave') { message.guild.leave().then(guild => console.log('left guild', guild.name)).catch(console.log); } + + if (message.content === 'stats') { + let m = ''; + m += `I am aware of ${message.guild.channels.length} channels\n`; + m += `I am aware of ${message.guild.members.length} members`; + message.channel.sendMessage(m); + } } }); function nameLoop(user) { - user.setUsername(user.username + 'a').then(nameLoop).catch(console.log); + // user.setUsername(user.username + 'a').then(nameLoop).catch(console.log); } function chanLoop(channel) { From bc443df11dde22f20c0628d7409279e0cc4bc027 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Tue, 3 May 2016 17:50:33 +0100 Subject: [PATCH 036/324] Added DM support, DM Creation and DM Deletion --- src/client/rest/RESTMethods.js | 57 +++++++++++++++++--- src/structures/GuildMember.js | 8 +++ src/structures/User.js | 8 +++ src/structures/interface/TextBasedChannel.js | 5 -- test/random.js | 11 +++- 5 files changed, 75 insertions(+), 14 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 810b3df58..70a4da882 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -2,7 +2,8 @@ const Constants = require('../../util/Constants'); const Structure = name => require('../../structures/' + name); - +const User = Structure('User'); +const GuildMember = Structure('GuildMember'); const Message = Structure('Message'); class RESTMethods{ @@ -39,13 +40,24 @@ class RESTMethods{ SendMessage(channel, content, tts, nonce) { return new Promise((resolve, reject) => { - this.rest.makeRequest('post', Constants.Endpoints.CHANNEL_MESSAGES(channel.id), true, { - content, tts, nonce, - }) - .then(data => { - resolve(this.rest.client.actions.MessageCreate.handle(data).m); - }) - .catch(reject); + + if (channel instanceof User || channel instanceof GuildMember) { + this.CreateDM(channel).then(chan => { + channel = chan; + req(); + }) + .catch(reject); + } + + var _this = this; + + function req() { + _this.rest.makeRequest('post', Constants.Endpoints.CHANNEL_MESSAGES(channel.id), true, { + content, tts, nonce, + }) + .then(data => resolve(_this.rest.client.actions.MessageCreate.handle(data).m)) + .catch(reject); + } }); } @@ -87,8 +99,37 @@ class RESTMethods{ }); } + GetExistingDM(recipient) { + let dmChannel = this.rest.client.store.getAsArray('channels') + .filter(channel => channel.recipient) + .filter(channel => channel.recipient.id === recipient.id); + + return dmChannel[0]; + } + + CreateDM(recipient) { + return new Promise((resolve, reject) => { + + let dmChannel = this.GetExistingDM(recipient); + + if (dmChannel) { + return resolve(dmChannel); + } + + this.rest.makeRequest('post', Constants.Endpoints.USER_CHANNELS(this.rest.client.store.user.id), true, { + recipient_id: recipient.id, + }) + .then(data => resolve(this.rest.client.actions.ChannelCreate.handle(data).channel)) + .catch(reject); + }); + } + DeleteChannel(channel) { return new Promise((resolve, reject) => { + if (channel instanceof User || channel instanceof GuildMember) { + channel = this.GetExistingDM(channel); + } + this.rest.makeRequest('del', Constants.Endpoints.CHANNEL(channel.id), true) .then(data => { data.id = channel.id; diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 265f0afe6..bacc3a314 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -1,5 +1,7 @@ 'use strict'; +const TextBasedChannel = require('./interface/TextBasedChannel'); + class GuildMember { constructor(guild, data) { this.client = guild.client; @@ -56,6 +58,12 @@ class GuildMember { get id() { return this.user.id; } + + deleteDM() { + return this.client.rest.methods.DeleteChannel(this); + } } +TextBasedChannel.applyToClass(GuildMember); + module.exports = GuildMember; diff --git a/src/structures/User.js b/src/structures/User.js index 4d48aed5a..e635f4937 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -1,5 +1,7 @@ 'use strict'; +const TextBasedChannel = require('./interface/TextBasedChannel'); + class User { constructor(client, data) { this.client = client; @@ -22,6 +24,10 @@ class User { return `<@${this.id}>`; } + deleteDM() { + return this.client.rest.methods.DeleteChannel(this); + } + equals(user) { let base = ( this.username === user.username && @@ -45,4 +51,6 @@ class User { } } +TextBasedChannel.applyToClass(User); + module.exports = User; diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 0656d03f7..a76a855a5 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -11,10 +11,5 @@ function sendTTSMessage(content, options) { } exports.applyToClass = structure => { - if (structure.name !== 'TextChannel' && structure.name !== 'DMChannel') { - throw new Error(structure + ' cannot implement TextBasedChannel'); - } - structure.prototype.sendMessage = sendMessage; - }; diff --git a/test/random.js b/test/random.js index 656986c42..6041df9ae 100644 --- a/test/random.js +++ b/test/random.js @@ -70,7 +70,7 @@ client.on('typingStop.', (channel, user, data) => { }); client.on('message', message => { - if (message.author.username === 'hydrabolt') { + if (true) { if (message.content === 'makechann') { if (message.channel.guild) { message.channel.guild.createChannel('hi', 'text').then(console.log); @@ -114,6 +114,15 @@ client.on('message', message => { m += `I am aware of ${message.guild.members.length} members`; message.channel.sendMessage(m); } + + if (message.content === 'messageme!') { + message.author.sendMessage('oh, hi there!').catch(e => console.log(e.stack)); + } + + if (message.content === 'don\'t dm me') { + message.author.deleteDM(); + } + } }); From fb49ad7d9310703392b0d00c279e1080645f6b0a Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sat, 7 May 2016 15:33:00 +0100 Subject: [PATCH 037/324] Fix Message Sending and Support New Features. The library now supports all the game streaming and URL stuff and is fixed for roles #328 src/client/websocket/packets/handlers/PresenceUpdate.js --- src/client/rest/RESTMethods.js | 6 ++++-- src/client/websocket/packets/handlers/PresenceUpdate.js | 6 +----- src/structures/EvaluatedPermissions.js | 2 +- src/structures/Role.js | 2 +- src/util/Constants.js | 6 +++++- test/random.js | 5 +++++ 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 70a4da882..54254689a 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -41,16 +41,18 @@ class RESTMethods{ SendMessage(channel, content, tts, nonce) { return new Promise((resolve, reject) => { + var _this = this; + if (channel instanceof User || channel instanceof GuildMember) { this.CreateDM(channel).then(chan => { channel = chan; req(); }) .catch(reject); + } else { + req(); } - var _this = this; - function req() { _this.rest.makeRequest('post', Constants.Endpoints.CHANNEL_MESSAGES(channel.id), true, { content, tts, nonce, diff --git a/src/client/websocket/packets/handlers/PresenceUpdate.js b/src/client/websocket/packets/handlers/PresenceUpdate.js index 889017bce..e3c5e4f1a 100644 --- a/src/client/websocket/packets/handlers/PresenceUpdate.js +++ b/src/client/websocket/packets/handlers/PresenceUpdate.js @@ -60,11 +60,7 @@ class PresenceUpdateHandler extends AbstractHandler { data.user.discriminator === user.discriminator && data.user.avatar === user.avatar && data.user.status === user.status && - !( - (data.user.game && !user.game) || - (!data.user.game && user.game) || - (data.user.game && user.game && data.user.game.name !== user.game.name) - ) + JSON.stringify(data.user.game) === JSON.stringify(user.game) ); if (!same) { diff --git a/src/structures/EvaluatedPermissions.js b/src/structures/EvaluatedPermissions.js index 96d0a4c9d..30ef07844 100644 --- a/src/structures/EvaluatedPermissions.js +++ b/src/structures/EvaluatedPermissions.js @@ -27,7 +27,7 @@ class EvaluatedPermissions { } if (!explicit) { - if ((this.permissions & Constants.PermissionFlags.MANAGE_ROLES) > 0) { + if ((this.permissions & Constants.PermissionFlags.ADMINISTRATOR) > 0) { return true; } } diff --git a/src/structures/Role.js b/src/structures/Role.js index 30dc865a3..5d8a7dfa8 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -40,7 +40,7 @@ class Role { } if (!explicit) { - if ((this.permissions & Constants.PermissionFlags.MANAGE_ROLES) > 0) { + if ((this.permissions & Constants.PermissionFlags.ADMINISTRATOR) > 0) { return true; } } diff --git a/src/util/Constants.js b/src/util/Constants.js index 54df21ad5..33ceeca14 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -146,7 +146,7 @@ const PermissionFlags = exports.PermissionFlags = { CREATE_INSTANT_INVITE: 1 << 0, KICK_MEMBERS: 1 << 1, BAN_MEMBERS: 1 << 2, - MANAGE_ROLES: 1 << 3, + ADMINISTRATOR: 1 << 3, MANAGE_CHANNELS: 1 << 4, MANAGE_GUILD: 1 << 5, @@ -165,6 +165,10 @@ const PermissionFlags = exports.PermissionFlags = { DEAFEN_MEMBERS: 1 << 23, MOVE_MEMBERS: 1 << 24, USE_VAD: 1 << 25, + + CHANGE_NICKNAME: 1 << 26, + MANAGE_NICKNAMES: 1 << 27, + MANAGE_ROLES_OR_PERMISSIONS: 1 << 28, }; let _ALL_PERMISSIONS = 0; diff --git a/test/random.js b/test/random.js index 6041df9ae..aeb7147d2 100644 --- a/test/random.js +++ b/test/random.js @@ -77,6 +77,11 @@ client.on('message', message => { } } + if (message.content === 'myperms?') { + message.channel.sendMessage('Your permissions are:\n' + + JSON.stringify(message.channel.permissionsFor(message.author).serialize(), null, 4)); + } + if (message.content === 'delchann') { message.channel.delete().then(chan => console.log('selfDelChann', chan.name)); } From bbf0b0683a9ac1a8f509bf91a8c4e380dfb1d380 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 2 Jul 2016 17:50:44 +0100 Subject: [PATCH 038/324] Added guild.kick(member) and member.kick() --- .gitignore | 74 +-- src/client/actions/ActionsManager.js | 53 +- src/client/actions/ChannelDelete.js | 88 +-- src/client/actions/GuildMemberRemove.js | 50 ++ src/client/rest/RESTMethods.js | 507 +++++++++--------- .../packets/handlers/ChannelUpdate.js | 56 +- .../packets/handlers/GuildMemberRemove.js | 9 +- src/structures/Guild.js | 7 +- src/structures/GuildMember.js | 4 + src/util/Constants.js | 1 + test/random.js | 7 + 11 files changed, 465 insertions(+), 391 deletions(-) create mode 100644 src/client/actions/GuildMemberRemove.js diff --git a/.gitignore b/.gitignore index d1ca39f79..9167b884f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,38 +1,38 @@ -# Created by https://www.gitignore.io - -.tmp/ -.vscode/ - -### Node ### -# Logs -logs -*.log - -test/auth.json - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git -node_modules -test/auth.json -examples/auth.json +# Created by https://www.gitignore.io + +.tmp/ +.vscode/ + +### Node ### +# Logs +logs +*.log + +test/auth.json + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git +node_modules +test/auth.json +examples/auth.json docs/_build \ No newline at end of file diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index 41d5be9de..051cde9be 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -1,26 +1,27 @@ -'use strict'; - -const requireAction = name => require(`./${name}`); - -class ActionsManager { - constructor(client) { - this.client = client; - - this.register('MessageCreate'); - this.register('MessageDelete'); - this.register('MessageUpdate'); - this.register('ChannelCreate'); - this.register('ChannelDelete'); - this.register('ChannelUpdate'); - this.register('GuildDelete'); - this.register('GuildUpdate'); - this.register('UserUpdate'); - } - - register(name) { - let Action = requireAction(name); - this[name] = new Action(this.client); - } -} - -module.exports = ActionsManager; +'use strict'; + +const requireAction = name => require(`./${name}`); + +class ActionsManager { + constructor(client) { + this.client = client; + + this.register('MessageCreate'); + this.register('MessageDelete'); + this.register('MessageUpdate'); + this.register('ChannelCreate'); + this.register('ChannelDelete'); + this.register('ChannelUpdate'); + this.register('GuildDelete'); + this.register('GuildUpdate'); + this.register('GuildMemberRemove'); + this.register('UserUpdate'); + } + + register(name) { + let Action = requireAction(name); + this[name] = new Action(this.client); + } +} + +module.exports = ActionsManager; diff --git a/src/client/actions/ChannelDelete.js b/src/client/actions/ChannelDelete.js index 4f021d0ed..36b6d0231 100644 --- a/src/client/actions/ChannelDelete.js +++ b/src/client/actions/ChannelDelete.js @@ -1,44 +1,44 @@ -'use strict'; - -const Action = require('./Action'); -const Constants = require('../../util/Constants'); -const Message = require('../../structures/Message'); - -class ChannelDeleteAction extends Action { - - constructor(client) { - super(client); - this.timeouts = []; - this.deleted = {}; - } - - handle(data) { - let client = this.client; - let channel = client.store.get('channels', data.id); - - if (channel) { - - client.store.KillChannel(channel); - this.deleted[channel.id] = channel; - this.scheduleForDeletion(channel.id); - - } else if (this.deleted[data.id]) { - - channel = this.deleted[data.id]; - - } - - return { - channel, - }; - } - - scheduleForDeletion(id) { - this.timeouts.push( - setTimeout(() => delete this.deleted[id], - this.client.options.rest_ws_bridge_timeout) - ); - } -}; - -module.exports = ChannelDeleteAction; +'use strict'; + +const Action = require('./Action'); +const Constants = require('../../util/Constants'); +const Message = require('../../structures/Message'); + +class ChannelDeleteAction extends Action { + + constructor(client) { + super(client); + this.timeouts = []; + this.deleted = {}; + } + + handle(data) { + let client = this.client; + let channel = client.store.get('channels', data.id); + + if (channel) { + + client.store.KillChannel(channel); + this.deleted[channel.id] = channel; + this.scheduleForDeletion(channel.id); + + } else if (this.deleted[data.id]) { + + channel = this.deleted[data.id]; + + } + + return { + channel, + }; + } + + scheduleForDeletion(id) { + this.timeouts.push( + setTimeout(() => delete this.deleted[id], + this.client.options.rest_ws_bridge_timeout) + ); + } +}; + +module.exports = ChannelDeleteAction; diff --git a/src/client/actions/GuildMemberRemove.js b/src/client/actions/GuildMemberRemove.js new file mode 100644 index 000000000..d9ddf62c7 --- /dev/null +++ b/src/client/actions/GuildMemberRemove.js @@ -0,0 +1,50 @@ +'use strict'; + +const Action = require('./Action'); +const Constants = require('../../util/Constants'); +const Message = require('../../structures/Message'); + +class GuildMemberRemoveAction extends Action { + + constructor(client) { + super(client); + this.timeouts = []; + this.deleted = {}; + } + + handle(data) { + let client = this.client; + let guild = client.store.get('guilds', data.guild_id); + if (guild) { + let member = guild.store.get('members', data.user.id); + if (member) { + guild._removeMember(member); + this.deleted[guild.id + data.user.id] = member; + this.scheduleForDeletion(guild.id, data.user.id); + } + + if (!member) { + member = this.deleted[guild.id + data.user.id]; + } + + return { + g: guild, + m: member, + }; + } + + return { + g: guild, + m: null, + }; + } + + scheduleForDeletion(guildID, userID) { + this.timeouts.push( + setTimeout(() => delete this.deleted[guildID + userID], + this.client.options.rest_ws_bridge_timeout) + ); + } +}; + +module.exports = GuildMemberRemoveAction; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 54254689a..ea812ebd2 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -1,247 +1,260 @@ -'use strict'; - -const Constants = require('../../util/Constants'); -const Structure = name => require('../../structures/' + name); -const User = Structure('User'); -const GuildMember = Structure('GuildMember'); -const Message = Structure('Message'); - -class RESTMethods{ - constructor(restManager) { - this.rest = restManager; - } - - LoginEmailPassword(email, password) { - return new Promise((resolve, reject) => { - this.rest.client.store.email = email; - this.rest.client.store.password = password; - this.rest.makeRequest('post', Constants.Endpoints.LOGIN, false, { email, password }) - .then(data => { - this.rest.client.manager.connectToWebSocket(data.token, resolve, reject); - }) - .catch(reject); - - }); - } - - LoginToken(token) { - return new Promise((resolve, reject) => { - this.rest.client.manager.connectToWebSocket(token, resolve, reject); - }); - } - - GetGateway() { - return new Promise((resolve, reject) => { - this.rest.makeRequest('get', Constants.Endpoints.GATEWAY, true) - .then(res => resolve(res.url)) - .catch(reject); - }); - } - - SendMessage(channel, content, tts, nonce) { - return new Promise((resolve, reject) => { - - var _this = this; - - if (channel instanceof User || channel instanceof GuildMember) { - this.CreateDM(channel).then(chan => { - channel = chan; - req(); - }) - .catch(reject); - } else { - req(); - } - - function req() { - _this.rest.makeRequest('post', Constants.Endpoints.CHANNEL_MESSAGES(channel.id), true, { - content, tts, nonce, - }) - .then(data => resolve(_this.rest.client.actions.MessageCreate.handle(data).m)) - .catch(reject); - } - }); - } - - DeleteMessage(message) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.CHANNEL_MESSAGE(message.channel.id, message.id), true) - .then(data => { - resolve(this.rest.client.actions.MessageDelete.handle({ - id: message.id, - channel_id: message.channel.id, - }).m); - }) - .catch(reject); - }); - } - - UpdateMessage(message, content) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('patch', Constants.Endpoints.CHANNEL_MESSAGE(message.channel.id, message.id), true, { - content, - }) - .then(data => { - resolve(this.rest.client.actions.MessageUpdate.handle(data).updated); - }) - .catch(reject); - }); - } - - CreateChannel(guild, channelName, channelType) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('post', Constants.Endpoints.GUILD_CHANNELS(guild.id), true, { - name: channelName, - type: channelType, - }) - .then(data => { - resolve(this.rest.client.actions.ChannelCreate.handle(data).channel); - }) - .catch(reject); - }); - } - - GetExistingDM(recipient) { - let dmChannel = this.rest.client.store.getAsArray('channels') - .filter(channel => channel.recipient) - .filter(channel => channel.recipient.id === recipient.id); - - return dmChannel[0]; - } - - CreateDM(recipient) { - return new Promise((resolve, reject) => { - - let dmChannel = this.GetExistingDM(recipient); - - if (dmChannel) { - return resolve(dmChannel); - } - - this.rest.makeRequest('post', Constants.Endpoints.USER_CHANNELS(this.rest.client.store.user.id), true, { - recipient_id: recipient.id, - }) - .then(data => resolve(this.rest.client.actions.ChannelCreate.handle(data).channel)) - .catch(reject); - }); - } - - DeleteChannel(channel) { - return new Promise((resolve, reject) => { - if (channel instanceof User || channel instanceof GuildMember) { - channel = this.GetExistingDM(channel); - } - - this.rest.makeRequest('del', Constants.Endpoints.CHANNEL(channel.id), true) - .then(data => { - data.id = channel.id; - resolve(this.rest.client.actions.ChannelDelete.handle(data).channel); - }) - .catch(reject); - }); - } - - UpdateChannel(channel, data) { - return new Promise((resolve, reject) => { - data.name = (data.name || channel.name).trim(); - data.topic = data.topic || channel.topic; - data.position = data.position || channel.position; - data.bitrate = data.bitrate || channel.bitrate; - - this.rest.makeRequest('patch', Constants.Endpoints.CHANNEL(channel.id), true, data) - .then(data => { - resolve(this.rest.client.actions.ChannelUpdate.handle(data).updated); - }) - .catch(reject); - }); - } - - LeaveGuild(guild) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.ME_GUILD(guild.id), true) - .then(() => { - resolve(this.rest.client.actions.GuildDelete.handle({ id:guild.id }).guild); - }) - .catch(reject); - }); - } - - // untested but probably will work - DeleteGuild(guild) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.GUILD(guild.id), true) - .then(() => { - resolve(this.rest.client.actions.GuildDelete.handle({ id:guild.id }).guild); - }) - .catch(reject); - }); - } - - UpdateCurrentUser(_data) { - return new Promise((resolve, reject) => { - let user = this.rest.client.store.user; - let data = {}; - - data.username = _data.username || user.username; - data.avatar = this.rest.client.resolver.ResolveBase64(_data.avatar) || user.avatar; - if (!user.bot) { - data.password = this.rest.client.store.password; - data.email = _data.email || this.rest.client.store.email; - data.new_password = _data.newPassword; - } - - this.rest.makeRequest('patch', Constants.Endpoints.ME, true, data) - .then(data => resolve(this.rest.client.actions.UserUpdate.handle(data).updated)) - .catch(reject); - }); - } - - UpdateGuild(guild, _data) { - return new Promise((resolve, reject) => { - /* - can contain: - name, region, verificationLevel, afkChannel, afkTimeout, icon, owner, splash - */ - - let data = {}; - - if (_data.name) { - data.name = _data.name; - } - - if (_data.region) { - data.region = _data.region; - } - - if (_data.verificationLevel) { - data.verification_level = Number(_data.verificationLevel); - } - - if (_data.afkChannel) { - data.afk_channel_id = this.rest.client.resolver.ResolveChannel(_data.afkChannel).id; - } - - if (_data.afkTimeout) { - data.afk_timeout = Number(_data.afkTimeout); - } - - if (_data.icon) { - data.icon = this.rest.client.resolver.ResolveBase64(_data.icon); - } - - if (_data.owner) { - data.owner_id = this.rest.client.resolver.ResolveUser(_data.owner).id; - } - - if (_data.splash) { - data.splash = this.rest.client.resolver.ResolveBase64(_data.splash); - } - - this.rest.makeRequest('patch', Constants.Endpoints.GUILD(guild.id), true, data) - .then(data => resolve(this.rest.client.actions.GuildUpdate.handle(data).updated)) - .catch(reject); - }); - } -} - -module.exports = RESTMethods; +'use strict'; + +const Constants = require('../../util/Constants'); +const Structure = name => require('../../structures/' + name); +const User = Structure('User'); +const GuildMember = Structure('GuildMember'); +const Message = Structure('Message'); + +class RESTMethods{ + constructor(restManager) { + this.rest = restManager; + } + + LoginEmailPassword(email, password) { + return new Promise((resolve, reject) => { + this.rest.client.store.email = email; + this.rest.client.store.password = password; + this.rest.makeRequest('post', Constants.Endpoints.LOGIN, false, { email, password }) + .then(data => { + this.rest.client.manager.connectToWebSocket(data.token, resolve, reject); + }) + .catch(reject); + + }); + } + + LoginToken(token) { + return new Promise((resolve, reject) => { + this.rest.client.manager.connectToWebSocket(token, resolve, reject); + }); + } + + GetGateway() { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.GATEWAY, true) + .then(res => resolve(res.url)) + .catch(reject); + }); + } + + SendMessage(channel, content, tts, nonce) { + return new Promise((resolve, reject) => { + + var _this = this; + + if (channel instanceof User || channel instanceof GuildMember) { + this.CreateDM(channel).then(chan => { + channel = chan; + req(); + }) + .catch(reject); + } else { + req(); + } + + function req() { + _this.rest.makeRequest('post', Constants.Endpoints.CHANNEL_MESSAGES(channel.id), true, { + content, tts, nonce, + }) + .then(data => resolve(_this.rest.client.actions.MessageCreate.handle(data).m)) + .catch(reject); + } + }); + } + + DeleteMessage(message) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.CHANNEL_MESSAGE(message.channel.id, message.id), true) + .then(data => { + resolve(this.rest.client.actions.MessageDelete.handle({ + id: message.id, + channel_id: message.channel.id, + }).m); + }) + .catch(reject); + }); + } + + UpdateMessage(message, content) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('patch', Constants.Endpoints.CHANNEL_MESSAGE(message.channel.id, message.id), true, { + content, + }) + .then(data => { + resolve(this.rest.client.actions.MessageUpdate.handle(data).updated); + }) + .catch(reject); + }); + } + + CreateChannel(guild, channelName, channelType) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('post', Constants.Endpoints.GUILD_CHANNELS(guild.id), true, { + name: channelName, + type: channelType, + }) + .then(data => { + resolve(this.rest.client.actions.ChannelCreate.handle(data).channel); + }) + .catch(reject); + }); + } + + GetExistingDM(recipient) { + let dmChannel = this.rest.client.store.getAsArray('channels') + .filter(channel => channel.recipient) + .filter(channel => channel.recipient.id === recipient.id); + + return dmChannel[0]; + } + + CreateDM(recipient) { + return new Promise((resolve, reject) => { + + let dmChannel = this.GetExistingDM(recipient); + + if (dmChannel) { + return resolve(dmChannel); + } + + this.rest.makeRequest('post', Constants.Endpoints.USER_CHANNELS(this.rest.client.store.user.id), true, { + recipient_id: recipient.id, + }) + .then(data => resolve(this.rest.client.actions.ChannelCreate.handle(data).channel)) + .catch(reject); + }); + } + + DeleteChannel(channel) { + return new Promise((resolve, reject) => { + if (channel instanceof User || channel instanceof GuildMember) { + channel = this.GetExistingDM(channel); + } + + this.rest.makeRequest('del', Constants.Endpoints.CHANNEL(channel.id), true) + .then(data => { + data.id = channel.id; + resolve(this.rest.client.actions.ChannelDelete.handle(data).channel); + }) + .catch(reject); + }); + } + + UpdateChannel(channel, data) { + return new Promise((resolve, reject) => { + data.name = (data.name || channel.name).trim(); + data.topic = data.topic || channel.topic; + data.position = data.position || channel.position; + data.bitrate = data.bitrate || channel.bitrate; + + this.rest.makeRequest('patch', Constants.Endpoints.CHANNEL(channel.id), true, data) + .then(data => { + resolve(this.rest.client.actions.ChannelUpdate.handle(data).updated); + }) + .catch(reject); + }); + } + + LeaveGuild(guild) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.ME_GUILD(guild.id), true) + .then(() => { + resolve(this.rest.client.actions.GuildDelete.handle({ id:guild.id }).guild); + }) + .catch(reject); + }); + } + + // untested but probably will work + DeleteGuild(guild) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.GUILD(guild.id), true) + .then(() => { + resolve(this.rest.client.actions.GuildDelete.handle({ id:guild.id }).guild); + }) + .catch(reject); + }); + } + + UpdateCurrentUser(_data) { + return new Promise((resolve, reject) => { + let user = this.rest.client.store.user; + let data = {}; + + data.username = _data.username || user.username; + data.avatar = this.rest.client.resolver.ResolveBase64(_data.avatar) || user.avatar; + if (!user.bot) { + data.password = this.rest.client.store.password; + data.email = _data.email || this.rest.client.store.email; + data.new_password = _data.newPassword; + } + + this.rest.makeRequest('patch', Constants.Endpoints.ME, true, data) + .then(data => resolve(this.rest.client.actions.UserUpdate.handle(data).updated)) + .catch(reject); + }); + } + + UpdateGuild(guild, _data) { + return new Promise((resolve, reject) => { + /* + can contain: + name, region, verificationLevel, afkChannel, afkTimeout, icon, owner, splash + */ + + let data = {}; + + if (_data.name) { + data.name = _data.name; + } + + if (_data.region) { + data.region = _data.region; + } + + if (_data.verificationLevel) { + data.verification_level = Number(_data.verificationLevel); + } + + if (_data.afkChannel) { + data.afk_channel_id = this.rest.client.resolver.ResolveChannel(_data.afkChannel).id; + } + + if (_data.afkTimeout) { + data.afk_timeout = Number(_data.afkTimeout); + } + + if (_data.icon) { + data.icon = this.rest.client.resolver.ResolveBase64(_data.icon); + } + + if (_data.owner) { + data.owner_id = this.rest.client.resolver.ResolveUser(_data.owner).id; + } + + if (_data.splash) { + data.splash = this.rest.client.resolver.ResolveBase64(_data.splash); + } + + this.rest.makeRequest('patch', Constants.Endpoints.GUILD(guild.id), true, data) + .then(data => resolve(this.rest.client.actions.GuildUpdate.handle(data).updated)) + .catch(reject); + }); + } + + KickGuildMember(guild, member) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.GUILD_MEMBER(guild.id, member.id), true) + .then(() => { + resolve(this.rest.client.actions.GuildMemberRemove.handle({ + guild_id : guild.id, + user : member.user, + }).m); + }) + .catch(reject); + }); + } +} + +module.exports = RESTMethods; diff --git a/src/client/websocket/packets/handlers/ChannelUpdate.js b/src/client/websocket/packets/handlers/ChannelUpdate.js index 699cfd432..41491a103 100644 --- a/src/client/websocket/packets/handlers/ChannelUpdate.js +++ b/src/client/websocket/packets/handlers/ChannelUpdate.js @@ -1,28 +1,28 @@ -'use strict'; - -const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); - -const ClientUser = Structure('ClientUser'); -const Guild = Structure('Guild'); -const ServerChannel = Structure('ServerChannel'); - -const Constants = require('../../../../util/Constants'); -const CloneObject = require('../../../../util/CloneObject'); - -class ChannelUpdateHandler extends AbstractHandler { - - constructor(packetManager) { - super(packetManager); - } - - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; - - client.actions.ChannelUpdate.handle(data); - } - -}; - -module.exports = ChannelUpdateHandler; +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); + +const ClientUser = Structure('ClientUser'); +const Guild = Structure('Guild'); +const ServerChannel = Structure('ServerChannel'); + +const Constants = require('../../../../util/Constants'); +const CloneObject = require('../../../../util/CloneObject'); + +class ChannelUpdateHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + client.actions.ChannelUpdate.handle(data); + } + +}; + +module.exports = ChannelUpdateHandler; diff --git a/src/client/websocket/packets/handlers/GuildMemberRemove.js b/src/client/websocket/packets/handlers/GuildMemberRemove.js index a46556c38..185cb768c 100644 --- a/src/client/websocket/packets/handlers/GuildMemberRemove.js +++ b/src/client/websocket/packets/handlers/GuildMemberRemove.js @@ -20,13 +20,10 @@ class GuildMemberRemoveHandler extends AbstractHandler { let data = packet.d; let client = this.packetManager.client; - let guild = client.store.get('guilds', data.guild_id); + let response = client.actions.GuildMemberRemove.handle(data); - if (guild) { - let member = guild.store.get('members', data.user.id); - if (member) { - guild._removeMember(member); - } + if (response.m) { + client.emit(Constants.Events.GUILD_MEMBER_REMOVE, response.g, response.m); } } diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 1d5e71a6d..a4607e03f 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -66,15 +66,16 @@ class Guild { _removeMember(guildMember) { this.store.remove('members', guildMember); - if (this.client.ws.status === Constants.Status.READY) { - this.client.emit(Constants.Events.GUILD_MEMBER_REMOVE, this, guildMember); - } } toString() { return this.name; } + kick(member) { + return this.member(member).kick(); + } + member(user) { return this.client.resolver.ResolveGuildMember(this, user); } diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index bacc3a314..d35cc163d 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -62,6 +62,10 @@ class GuildMember { deleteDM() { return this.client.rest.methods.DeleteChannel(this); } + + kick() { + return this.client.rest.methods.KickGuildMember(this.guild, this); + } } TextBasedChannel.applyToClass(GuildMember); diff --git a/src/util/Constants.js b/src/util/Constants.js index 33ceeca14..e03fdf105 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -58,6 +58,7 @@ const Endpoints = exports.Endpoints = { GUILD_BANS: (guildID) => `${Endpoints.GUILD(guildID)}/bans`, GUILD_INTEGRATIONS: (guildID) => `${Endpoints.GUILD(guildID)}/integrations`, GUILD_MEMBERS: (guildID) => `${Endpoints.GUILD(guildID)}/members`, + GUILD_MEMBER: (guildID, memberID) => `${Endpoints.GUILD_MEMBERS(guildID)}/${memberID}`, GUILD_CHANNELS: (guildID) => `${Endpoints.GUILD(guildID)}/channels`, // channels diff --git a/test/random.js b/test/random.js index aeb7147d2..dfe96f699 100644 --- a/test/random.js +++ b/test/random.js @@ -128,6 +128,13 @@ client.on('message', message => { message.author.deleteDM(); } + if (message.content.startsWith('kick')) { + message.guild.member(message.mentions[0]).kick().then(member => { + console.log(member); + message.channel.sendMessage('Kicked!' + member.user.username); + }).catch(console.log); + } + } }); From 849b8df2dad8ccc5196130418e010df200f76f3f Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 2 Jul 2016 21:28:49 +0100 Subject: [PATCH 039/324] Added guild.createRole() --- README.md | 10 +- package.json | 110 ++-- src/client/actions/ActionsManager.js | 1 + src/client/actions/GuildRoleCreate.js | 38 ++ src/client/rest/RESTMethods.js | 533 +++++++++--------- .../packets/handlers/GuildRoleCreate.js | 13 +- src/structures/Guild.js | 4 + test/random.js | 5 + 8 files changed, 382 insertions(+), 332 deletions(-) create mode 100644 src/client/actions/GuildRoleCreate.js diff --git a/README.md b/README.md index 2514699cb..5e05bbbea 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -

- - discord.js
-
-

REWRITE

+

+ + discord.js
+
+

REWRITE

\ No newline at end of file diff --git a/package.json b/package.json index b3e6705e3..36d8e745e 100644 --- a/package.json +++ b/package.json @@ -1,55 +1,55 @@ -{ - "name": "discord.js", - "version": "7.0.0", - "description": "A way to interface with the Discord API", - "main": "./src/index", - "scripts": { - "test": "jscs src && node test/random" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hydrabolt/discord.js.git" - }, - "keywords": [ - "discord", - "api", - "bot", - "client", - "node", - "discordapp" - ], - "author": "Amish Shah ", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/hydrabolt/discord.js/issues" - }, - "homepage": "https://github.com/hydrabolt/discord.js#readme", - "dependencies": { - "babel-plugin-transform-runtime": "^6.6.0", - "object.values": "^1.0.3", - "superagent": "^1.5.0", - "unpipe": "^1.0.0", - "ws": "^0.8.1" - }, - "devDependencies": { - "babel-preset-es2015": "^6.6.0", - "babel-preset-stage-3": "^6.5.0", - "grunt": "^0.4.5", - "grunt-babel": "^6.0.0", - "grunt-browserify": "^4.0.1", - "grunt-contrib-uglify": "^0.11.0", - "grunt-jscs": "^2.8.0", - "jscs": "^2.11.0", - "load-grunt-tasks": "^3.3.0" - }, - "optionalDependencies": { - "node-opus": "^0.1.11" - }, - "engines": { - "node": ">=0.12.7" - }, - "browser": { - "./src/Util/TokenCacher.js": "./src/Util/TokenCacher-shim.js", - "./lib/Util/TokenCacher.js": "./lib/Util/TokenCacher-shim.js" - } -} +{ + "name": "discord.js", + "version": "7.0.0", + "description": "A way to interface with the Discord API", + "main": "./src/index", + "scripts": { + "test": "jscs src && node test/random" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/hydrabolt/discord.js.git" + }, + "keywords": [ + "discord", + "api", + "bot", + "client", + "node", + "discordapp" + ], + "author": "Amish Shah ", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/hydrabolt/discord.js/issues" + }, + "homepage": "https://github.com/hydrabolt/discord.js#readme", + "dependencies": { + "babel-plugin-transform-runtime": "^6.6.0", + "object.values": "^1.0.3", + "superagent": "^1.5.0", + "unpipe": "^1.0.0", + "ws": "^0.8.1" + }, + "devDependencies": { + "babel-preset-es2015": "^6.6.0", + "babel-preset-stage-3": "^6.5.0", + "grunt": "^0.4.5", + "grunt-babel": "^6.0.0", + "grunt-browserify": "^4.0.1", + "grunt-contrib-uglify": "^0.11.0", + "grunt-jscs": "^2.8.0", + "jscs": "^2.11.0", + "load-grunt-tasks": "^3.3.0" + }, + "optionalDependencies": { + "node-opus": "^0.1.11" + }, + "engines": { + "node": ">=0.12.7" + }, + "browser": { + "./src/Util/TokenCacher.js": "./src/Util/TokenCacher-shim.js", + "./lib/Util/TokenCacher.js": "./lib/Util/TokenCacher-shim.js" + } +} diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index 051cde9be..51d4fdebc 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -15,6 +15,7 @@ class ActionsManager { this.register('GuildDelete'); this.register('GuildUpdate'); this.register('GuildMemberRemove'); + this.register('GuildRoleCreate'); this.register('UserUpdate'); } diff --git a/src/client/actions/GuildRoleCreate.js b/src/client/actions/GuildRoleCreate.js new file mode 100644 index 000000000..0a929d351 --- /dev/null +++ b/src/client/actions/GuildRoleCreate.js @@ -0,0 +1,38 @@ +'use strict'; + +const Action = require('./Action'); +const Constants = require('../../util/Constants'); +const Role = require('../../structures/Role'); + +class GuildRoleCreate extends Action { + + constructor(client) { + super(client); + } + + handle(data) { + + let client = this.client; + let guild = client.store.get('guilds', data.guild_id); + + if (guild) { + let already = guild.store.get('roles', data.role.id); + let role = new Role(guild, data.role); + guild.store.add('roles', role); + + if (!already) { + client.emit(Constants.Events.GUILD_ROLE_CREATE, guild, role); + } + + return { + role, + }; + } + + return { + role: null, + }; + } +}; + +module.exports = GuildRoleCreate; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index ea812ebd2..e8f05cde3 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -1,260 +1,273 @@ -'use strict'; - -const Constants = require('../../util/Constants'); -const Structure = name => require('../../structures/' + name); -const User = Structure('User'); -const GuildMember = Structure('GuildMember'); -const Message = Structure('Message'); - -class RESTMethods{ - constructor(restManager) { - this.rest = restManager; - } - - LoginEmailPassword(email, password) { - return new Promise((resolve, reject) => { - this.rest.client.store.email = email; - this.rest.client.store.password = password; - this.rest.makeRequest('post', Constants.Endpoints.LOGIN, false, { email, password }) - .then(data => { - this.rest.client.manager.connectToWebSocket(data.token, resolve, reject); - }) - .catch(reject); - - }); - } - - LoginToken(token) { - return new Promise((resolve, reject) => { - this.rest.client.manager.connectToWebSocket(token, resolve, reject); - }); - } - - GetGateway() { - return new Promise((resolve, reject) => { - this.rest.makeRequest('get', Constants.Endpoints.GATEWAY, true) - .then(res => resolve(res.url)) - .catch(reject); - }); - } - - SendMessage(channel, content, tts, nonce) { - return new Promise((resolve, reject) => { - - var _this = this; - - if (channel instanceof User || channel instanceof GuildMember) { - this.CreateDM(channel).then(chan => { - channel = chan; - req(); - }) - .catch(reject); - } else { - req(); - } - - function req() { - _this.rest.makeRequest('post', Constants.Endpoints.CHANNEL_MESSAGES(channel.id), true, { - content, tts, nonce, - }) - .then(data => resolve(_this.rest.client.actions.MessageCreate.handle(data).m)) - .catch(reject); - } - }); - } - - DeleteMessage(message) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.CHANNEL_MESSAGE(message.channel.id, message.id), true) - .then(data => { - resolve(this.rest.client.actions.MessageDelete.handle({ - id: message.id, - channel_id: message.channel.id, - }).m); - }) - .catch(reject); - }); - } - - UpdateMessage(message, content) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('patch', Constants.Endpoints.CHANNEL_MESSAGE(message.channel.id, message.id), true, { - content, - }) - .then(data => { - resolve(this.rest.client.actions.MessageUpdate.handle(data).updated); - }) - .catch(reject); - }); - } - - CreateChannel(guild, channelName, channelType) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('post', Constants.Endpoints.GUILD_CHANNELS(guild.id), true, { - name: channelName, - type: channelType, - }) - .then(data => { - resolve(this.rest.client.actions.ChannelCreate.handle(data).channel); - }) - .catch(reject); - }); - } - - GetExistingDM(recipient) { - let dmChannel = this.rest.client.store.getAsArray('channels') - .filter(channel => channel.recipient) - .filter(channel => channel.recipient.id === recipient.id); - - return dmChannel[0]; - } - - CreateDM(recipient) { - return new Promise((resolve, reject) => { - - let dmChannel = this.GetExistingDM(recipient); - - if (dmChannel) { - return resolve(dmChannel); - } - - this.rest.makeRequest('post', Constants.Endpoints.USER_CHANNELS(this.rest.client.store.user.id), true, { - recipient_id: recipient.id, - }) - .then(data => resolve(this.rest.client.actions.ChannelCreate.handle(data).channel)) - .catch(reject); - }); - } - - DeleteChannel(channel) { - return new Promise((resolve, reject) => { - if (channel instanceof User || channel instanceof GuildMember) { - channel = this.GetExistingDM(channel); - } - - this.rest.makeRequest('del', Constants.Endpoints.CHANNEL(channel.id), true) - .then(data => { - data.id = channel.id; - resolve(this.rest.client.actions.ChannelDelete.handle(data).channel); - }) - .catch(reject); - }); - } - - UpdateChannel(channel, data) { - return new Promise((resolve, reject) => { - data.name = (data.name || channel.name).trim(); - data.topic = data.topic || channel.topic; - data.position = data.position || channel.position; - data.bitrate = data.bitrate || channel.bitrate; - - this.rest.makeRequest('patch', Constants.Endpoints.CHANNEL(channel.id), true, data) - .then(data => { - resolve(this.rest.client.actions.ChannelUpdate.handle(data).updated); - }) - .catch(reject); - }); - } - - LeaveGuild(guild) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.ME_GUILD(guild.id), true) - .then(() => { - resolve(this.rest.client.actions.GuildDelete.handle({ id:guild.id }).guild); - }) - .catch(reject); - }); - } - - // untested but probably will work - DeleteGuild(guild) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.GUILD(guild.id), true) - .then(() => { - resolve(this.rest.client.actions.GuildDelete.handle({ id:guild.id }).guild); - }) - .catch(reject); - }); - } - - UpdateCurrentUser(_data) { - return new Promise((resolve, reject) => { - let user = this.rest.client.store.user; - let data = {}; - - data.username = _data.username || user.username; - data.avatar = this.rest.client.resolver.ResolveBase64(_data.avatar) || user.avatar; - if (!user.bot) { - data.password = this.rest.client.store.password; - data.email = _data.email || this.rest.client.store.email; - data.new_password = _data.newPassword; - } - - this.rest.makeRequest('patch', Constants.Endpoints.ME, true, data) - .then(data => resolve(this.rest.client.actions.UserUpdate.handle(data).updated)) - .catch(reject); - }); - } - - UpdateGuild(guild, _data) { - return new Promise((resolve, reject) => { - /* - can contain: - name, region, verificationLevel, afkChannel, afkTimeout, icon, owner, splash - */ - - let data = {}; - - if (_data.name) { - data.name = _data.name; - } - - if (_data.region) { - data.region = _data.region; - } - - if (_data.verificationLevel) { - data.verification_level = Number(_data.verificationLevel); - } - - if (_data.afkChannel) { - data.afk_channel_id = this.rest.client.resolver.ResolveChannel(_data.afkChannel).id; - } - - if (_data.afkTimeout) { - data.afk_timeout = Number(_data.afkTimeout); - } - - if (_data.icon) { - data.icon = this.rest.client.resolver.ResolveBase64(_data.icon); - } - - if (_data.owner) { - data.owner_id = this.rest.client.resolver.ResolveUser(_data.owner).id; - } - - if (_data.splash) { - data.splash = this.rest.client.resolver.ResolveBase64(_data.splash); - } - - this.rest.makeRequest('patch', Constants.Endpoints.GUILD(guild.id), true, data) - .then(data => resolve(this.rest.client.actions.GuildUpdate.handle(data).updated)) - .catch(reject); - }); - } - - KickGuildMember(guild, member) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.GUILD_MEMBER(guild.id, member.id), true) - .then(() => { - resolve(this.rest.client.actions.GuildMemberRemove.handle({ - guild_id : guild.id, - user : member.user, - }).m); - }) - .catch(reject); - }); - } -} - -module.exports = RESTMethods; +'use strict'; + +const Constants = require('../../util/Constants'); +const Structure = name => require('../../structures/' + name); +const User = Structure('User'); +const GuildMember = Structure('GuildMember'); +const Message = Structure('Message'); + +class RESTMethods{ + constructor(restManager) { + this.rest = restManager; + } + + LoginEmailPassword(email, password) { + return new Promise((resolve, reject) => { + this.rest.client.store.email = email; + this.rest.client.store.password = password; + this.rest.makeRequest('post', Constants.Endpoints.LOGIN, false, { email, password }) + .then(data => { + this.rest.client.manager.connectToWebSocket(data.token, resolve, reject); + }) + .catch(reject); + + }); + } + + LoginToken(token) { + return new Promise((resolve, reject) => { + this.rest.client.manager.connectToWebSocket(token, resolve, reject); + }); + } + + GetGateway() { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.GATEWAY, true) + .then(res => resolve(res.url)) + .catch(reject); + }); + } + + SendMessage(channel, content, tts, nonce) { + return new Promise((resolve, reject) => { + + var _this = this; + + if (channel instanceof User || channel instanceof GuildMember) { + this.CreateDM(channel).then(chan => { + channel = chan; + req(); + }) + .catch(reject); + } else { + req(); + } + + function req() { + _this.rest.makeRequest('post', Constants.Endpoints.CHANNEL_MESSAGES(channel.id), true, { + content, tts, nonce, + }) + .then(data => resolve(_this.rest.client.actions.MessageCreate.handle(data).m)) + .catch(reject); + } + }); + } + + DeleteMessage(message) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.CHANNEL_MESSAGE(message.channel.id, message.id), true) + .then(data => { + resolve(this.rest.client.actions.MessageDelete.handle({ + id: message.id, + channel_id: message.channel.id, + }).m); + }) + .catch(reject); + }); + } + + UpdateMessage(message, content) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('patch', Constants.Endpoints.CHANNEL_MESSAGE(message.channel.id, message.id), true, { + content, + }) + .then(data => { + resolve(this.rest.client.actions.MessageUpdate.handle(data).updated); + }) + .catch(reject); + }); + } + + CreateChannel(guild, channelName, channelType) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('post', Constants.Endpoints.GUILD_CHANNELS(guild.id), true, { + name: channelName, + type: channelType, + }) + .then(data => { + resolve(this.rest.client.actions.ChannelCreate.handle(data).channel); + }) + .catch(reject); + }); + } + + GetExistingDM(recipient) { + let dmChannel = this.rest.client.store.getAsArray('channels') + .filter(channel => channel.recipient) + .filter(channel => channel.recipient.id === recipient.id); + + return dmChannel[0]; + } + + CreateDM(recipient) { + return new Promise((resolve, reject) => { + + let dmChannel = this.GetExistingDM(recipient); + + if (dmChannel) { + return resolve(dmChannel); + } + + this.rest.makeRequest('post', Constants.Endpoints.USER_CHANNELS(this.rest.client.store.user.id), true, { + recipient_id: recipient.id, + }) + .then(data => resolve(this.rest.client.actions.ChannelCreate.handle(data).channel)) + .catch(reject); + }); + } + + DeleteChannel(channel) { + return new Promise((resolve, reject) => { + if (channel instanceof User || channel instanceof GuildMember) { + channel = this.GetExistingDM(channel); + } + + this.rest.makeRequest('del', Constants.Endpoints.CHANNEL(channel.id), true) + .then(data => { + data.id = channel.id; + resolve(this.rest.client.actions.ChannelDelete.handle(data).channel); + }) + .catch(reject); + }); + } + + UpdateChannel(channel, data) { + return new Promise((resolve, reject) => { + data.name = (data.name || channel.name).trim(); + data.topic = data.topic || channel.topic; + data.position = data.position || channel.position; + data.bitrate = data.bitrate || channel.bitrate; + + this.rest.makeRequest('patch', Constants.Endpoints.CHANNEL(channel.id), true, data) + .then(data => { + resolve(this.rest.client.actions.ChannelUpdate.handle(data).updated); + }) + .catch(reject); + }); + } + + LeaveGuild(guild) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.ME_GUILD(guild.id), true) + .then(() => { + resolve(this.rest.client.actions.GuildDelete.handle({ id:guild.id }).guild); + }) + .catch(reject); + }); + } + + // untested but probably will work + DeleteGuild(guild) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.GUILD(guild.id), true) + .then(() => { + resolve(this.rest.client.actions.GuildDelete.handle({ id:guild.id }).guild); + }) + .catch(reject); + }); + } + + UpdateCurrentUser(_data) { + return new Promise((resolve, reject) => { + let user = this.rest.client.store.user; + let data = {}; + + data.username = _data.username || user.username; + data.avatar = this.rest.client.resolver.ResolveBase64(_data.avatar) || user.avatar; + if (!user.bot) { + data.password = this.rest.client.store.password; + data.email = _data.email || this.rest.client.store.email; + data.new_password = _data.newPassword; + } + + this.rest.makeRequest('patch', Constants.Endpoints.ME, true, data) + .then(data => resolve(this.rest.client.actions.UserUpdate.handle(data).updated)) + .catch(reject); + }); + } + + UpdateGuild(guild, _data) { + return new Promise((resolve, reject) => { + /* + can contain: + name, region, verificationLevel, afkChannel, afkTimeout, icon, owner, splash + */ + + let data = {}; + + if (_data.name) { + data.name = _data.name; + } + + if (_data.region) { + data.region = _data.region; + } + + if (_data.verificationLevel) { + data.verification_level = Number(_data.verificationLevel); + } + + if (_data.afkChannel) { + data.afk_channel_id = this.rest.client.resolver.ResolveChannel(_data.afkChannel).id; + } + + if (_data.afkTimeout) { + data.afk_timeout = Number(_data.afkTimeout); + } + + if (_data.icon) { + data.icon = this.rest.client.resolver.ResolveBase64(_data.icon); + } + + if (_data.owner) { + data.owner_id = this.rest.client.resolver.ResolveUser(_data.owner).id; + } + + if (_data.splash) { + data.splash = this.rest.client.resolver.ResolveBase64(_data.splash); + } + + this.rest.makeRequest('patch', Constants.Endpoints.GUILD(guild.id), true, data) + .then(data => resolve(this.rest.client.actions.GuildUpdate.handle(data).updated)) + .catch(reject); + }); + } + + KickGuildMember(guild, member) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.GUILD_MEMBER(guild.id, member.id), true) + .then(() => { + resolve(this.rest.client.actions.GuildMemberRemove.handle({ + guild_id : guild.id, + user : member.user, + }).m); + }) + .catch(reject); + }); + } + + CreateGuildRole(guild) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('post', Constants.Endpoints.GUILD_ROLES(guild.id), true) + .then(role => { + resolve(this.rest.client.actions.GuildRoleCreate.handle({ + guild_id : guild.id, + role, + }).role); + }) + .catch(reject); + }); + } +} + +module.exports = RESTMethods; diff --git a/src/client/websocket/packets/handlers/GuildRoleCreate.js b/src/client/websocket/packets/handlers/GuildRoleCreate.js index 8f8666089..c2ffdbb43 100644 --- a/src/client/websocket/packets/handlers/GuildRoleCreate.js +++ b/src/client/websocket/packets/handlers/GuildRoleCreate.js @@ -17,18 +17,7 @@ class GuildRoleCreateHandler extends AbstractHandler { let data = packet.d; let client = this.packetManager.client; - let guild = client.store.get('guilds', data.guild_id); - - if (guild) { - let already = guild.store.get('roles', data.role.id); - let role = new Role(guild, data.role); - guild.store.add('roles', role); - - if (!already) { - client.emit(Constants.Events.GUILD_ROLE_CREATE, guild, role); - } - } - + let response = client.actions.GuildRoleCreate.handle(data); } }; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index a4607e03f..b5bd9f5b3 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -180,6 +180,10 @@ class Guild { return this.client.rest.methods.CreateChannel(this, name, type); } + createRole() { + return this.client.rest.methods.CreateGuildRole(this); + } + leave() { return this.client.rest.methods.LeaveGuild(this); } diff --git a/test/random.js b/test/random.js index dfe96f699..d61ea9653 100644 --- a/test/random.js +++ b/test/random.js @@ -135,6 +135,11 @@ client.on('message', message => { }).catch(console.log); } + if (message.content === 'makerole') { + message.guild.createRole().then(role => { + message.channel.sendMessage(`Made role ${role.name}`); + }).catch(console.log); + } } }); From 3cd91a19aae83082e9b3db0572ef16ce7ed8c067 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 3 Jul 2016 13:04:39 +0100 Subject: [PATCH 040/324] Added role.delete() --- src/client/Client.js | 84 +++++++++---------- src/client/actions/ActionsManager.js | 1 + src/client/actions/GuildMemberRemove.js | 1 + src/client/actions/GuildRoleDelete.js | 50 +++++++++++ src/client/rest/RESTMethods.js | 19 ++++- .../packets/handlers/GuildMemberRemove.js | 4 - .../packets/handlers/GuildRoleDelete.js | 59 ++++++------- src/structures/Role.js | 4 + src/util/Constants.js | 1 + test/random.js | 1 + 10 files changed, 141 insertions(+), 83 deletions(-) create mode 100644 src/client/actions/GuildRoleDelete.js diff --git a/src/client/Client.js b/src/client/Client.js index b51ac03e6..bd3ba133f 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -1,42 +1,42 @@ -'use strict'; - -const EventEmitter = require('events').EventEmitter; -const MergeDefault = require('../util/MergeDefault'); -const Constants = require('../util/Constants'); -const RESTManager = require('./rest/RestManager'); -const ClientDataStore = require('../structures/DataStore/ClientDataStore'); -const ClientManager = require('./ClientManager'); -const ClientDataResolver = require('./ClientDataResolver'); -const WebSocketManager = require('./websocket/WebSocketManager'); -const ActionsManager = require('./actions/ActionsManager'); - -class Client extends EventEmitter{ - - constructor(options) { - super(); - this.options = MergeDefault(Constants.DefaultOptions, options); - this.rest = new RESTManager(this); - this.store = new ClientDataStore(this); - this.manager = new ClientManager(this); - this.ws = new WebSocketManager(this); - this.resolver = new ClientDataResolver(this); - this.actions = new ActionsManager(this); - } - - login(email, password) { - if (password) { - // login with email and password - return this.rest.methods.LoginEmailPassword(email, password); - } else { - // login with token - return this.rest.methods.LoginToken(email); - } - } - - get user() { - return this.store.user; - } - -} - -module.exports = Client; +'use strict'; + +const EventEmitter = require('events').EventEmitter; +const MergeDefault = require('../util/MergeDefault'); +const Constants = require('../util/Constants'); +const RESTManager = require('./rest/RestManager'); +const ClientDataStore = require('../structures/DataStore/ClientDataStore'); +const ClientManager = require('./ClientManager'); +const ClientDataResolver = require('./ClientDataResolver'); +const WebSocketManager = require('./websocket/WebSocketManager'); +const ActionsManager = require('./actions/ActionsManager'); + +class Client extends EventEmitter{ + + constructor(options) { + super(); + this.options = MergeDefault(Constants.DefaultOptions, options); + this.rest = new RESTManager(this); + this.store = new ClientDataStore(this); + this.manager = new ClientManager(this); + this.ws = new WebSocketManager(this); + this.resolver = new ClientDataResolver(this); + this.actions = new ActionsManager(this); + } + + login(email, password) { + if (password) { + // login with email and password + return this.rest.methods.LoginEmailPassword(email, password); + } else { + // login with token + return this.rest.methods.LoginToken(email); + } + } + + get user() { + return this.store.user; + } + +} + +module.exports = Client; diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index 51d4fdebc..e275963b9 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -16,6 +16,7 @@ class ActionsManager { this.register('GuildUpdate'); this.register('GuildMemberRemove'); this.register('GuildRoleCreate'); + this.register('GuildRoleDelete'); this.register('UserUpdate'); } diff --git a/src/client/actions/GuildMemberRemove.js b/src/client/actions/GuildMemberRemove.js index d9ddf62c7..7ef912467 100644 --- a/src/client/actions/GuildMemberRemove.js +++ b/src/client/actions/GuildMemberRemove.js @@ -20,6 +20,7 @@ class GuildMemberRemoveAction extends Action { if (member) { guild._removeMember(member); this.deleted[guild.id + data.user.id] = member; + client.emit(Constants.Events.GUILD_MEMBER_REMOVE, guild, member); this.scheduleForDeletion(guild.id, data.user.id); } diff --git a/src/client/actions/GuildRoleDelete.js b/src/client/actions/GuildRoleDelete.js new file mode 100644 index 000000000..687305b30 --- /dev/null +++ b/src/client/actions/GuildRoleDelete.js @@ -0,0 +1,50 @@ +'use strict'; + +const Action = require('./Action'); +const Constants = require('../../util/Constants'); +const Message = require('../../structures/Message'); + +class GuildRoleDeleteAction extends Action { + + constructor(client) { + super(client); + this.timeouts = []; + this.deleted = {}; + } + + handle(data) { + let client = this.client; + let guild = client.store.get('guilds', data.guild_id); + + if (guild) { + let exists = guild.store.get('roles', data.role_id); + if (exists) { + guild.store.remove('roles', data.role_id); + this.deleted[guild.id + data.role_id] = exists; + this.scheduleForDeletion(guild.id, data.role_id); + client.emit(Constants.Events.GUILD_ROLE_DELETE, guild, exists); + } + + if (!exists) { + exists = this.deleted[guild.id + data.role_id]; + } + + return { + role: exists, + }; + } + + return { + role: null, + }; + } + + scheduleForDeletion(guildID, roleID) { + this.timeouts.push( + setTimeout(() => delete this.deleted[guildID + roleID], + this.client.options.rest_ws_bridge_timeout) + ); + } +}; + +module.exports = GuildRoleDeleteAction; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index e8f05cde3..43eaeb9d6 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -248,8 +248,8 @@ class RESTMethods{ this.rest.makeRequest('del', Constants.Endpoints.GUILD_MEMBER(guild.id, member.id), true) .then(() => { resolve(this.rest.client.actions.GuildMemberRemove.handle({ - guild_id : guild.id, - user : member.user, + guild_id: guild.id, + user: member.user, }).m); }) .catch(reject); @@ -261,13 +261,26 @@ class RESTMethods{ this.rest.makeRequest('post', Constants.Endpoints.GUILD_ROLES(guild.id), true) .then(role => { resolve(this.rest.client.actions.GuildRoleCreate.handle({ - guild_id : guild.id, + guild_id: guild.id, role, }).role); }) .catch(reject); }); } + + DeleteGuildRole(role) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.GUILD_ROLE(role.guild.id, role.id), true) + .then(() => { + resolve(this.rest.client.actions.GuildRoleDelete.handle({ + guild_id: role.guild.id, + role_id: role.id, + }).role); + }) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/client/websocket/packets/handlers/GuildMemberRemove.js b/src/client/websocket/packets/handlers/GuildMemberRemove.js index 185cb768c..cf61c816b 100644 --- a/src/client/websocket/packets/handlers/GuildMemberRemove.js +++ b/src/client/websocket/packets/handlers/GuildMemberRemove.js @@ -21,10 +21,6 @@ class GuildMemberRemoveHandler extends AbstractHandler { let client = this.packetManager.client; let response = client.actions.GuildMemberRemove.handle(data); - - if (response.m) { - client.emit(Constants.Events.GUILD_MEMBER_REMOVE, response.g, response.m); - } } }; diff --git a/src/client/websocket/packets/handlers/GuildRoleDelete.js b/src/client/websocket/packets/handlers/GuildRoleDelete.js index 002d2321e..2214a7982 100644 --- a/src/client/websocket/packets/handlers/GuildRoleDelete.js +++ b/src/client/websocket/packets/handlers/GuildRoleDelete.js @@ -1,34 +1,25 @@ -'use strict'; - -const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); -const Constants = require('../../../../util/Constants'); - -const Role = Structure('Role'); -const Guild = Structure('Guild'); - -class GuildRoleDeleteHandler extends AbstractHandler { - - constructor(packetManager) { - super(packetManager); - } - - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; - - let guild = client.store.get('guilds', data.guild_id); - - if (guild) { - let exists = guild.store.get('roles', data.role_id); - if (exists) { - guild.store.remove('roles', data.role_id); - client.emit(Constants.Events.GUILD_ROLE_DELETE, guild, exists); - } - } - - } - -}; - -module.exports = GuildRoleDeleteHandler; +'use strict'; + +const AbstractHandler = require('./AbstractHandler'); +const Structure = name => require(`../../../../structures/${name}`); +const Constants = require('../../../../util/Constants'); + +const Role = Structure('Role'); +const Guild = Structure('Guild'); + +class GuildRoleDeleteHandler extends AbstractHandler { + + constructor(packetManager) { + super(packetManager); + } + + handle(packet) { + let data = packet.d; + let client = this.packetManager.client; + + let response = client.actions.GuildRoleDelete.handle(data); + } + +}; + +module.exports = GuildRoleDeleteHandler; diff --git a/src/structures/Role.js b/src/structures/Role.js index 5d8a7dfa8..864f4ccf6 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -21,6 +21,10 @@ class Role { this.managed = data.managed; } + delete() { + return this.client.rest.methods.DeleteGuildRole(this); + } + serialize() { let serializedPermissions = {}; for (let permissionName in Constants.PermissionFlags) { diff --git a/src/util/Constants.js b/src/util/Constants.js index e03fdf105..daf082231 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -55,6 +55,7 @@ const Endpoints = exports.Endpoints = { GUILD_EMBED: (guildID) => `${Endpoints.GUILD(guildID)}/embed`, GUILD_INVITES: (guildID) => `${Endpoints.GUILD(guildID)}/invites`, GUILD_ROLES: (guildID) => `${Endpoints.GUILD(guildID)}/roles`, + GUILD_ROLE: (guildID, roleID) => `${Endpoints.GUILD_ROLES(guildID)}/${roleID}`, GUILD_BANS: (guildID) => `${Endpoints.GUILD(guildID)}/bans`, GUILD_INTEGRATIONS: (guildID) => `${Endpoints.GUILD(guildID)}/integrations`, GUILD_MEMBERS: (guildID) => `${Endpoints.GUILD(guildID)}/members`, diff --git a/test/random.js b/test/random.js index d61ea9653..f84b2865e 100644 --- a/test/random.js +++ b/test/random.js @@ -41,6 +41,7 @@ client.on('guildMemberRemove', (guild, user) => { client.on('guildRoleCreate', (guild, role) => { console.log('new role', role.name, 'in', guild.name); + role.delete().then(role => console.log("deleted " + role.name)).catch(console.log); }); client.on('guildRoleDelete', (guild, role) => { From 0d53afe3cec95bd4f4df51d186b860468d349cd6 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 3 Jul 2016 16:27:04 +0100 Subject: [PATCH 041/324] Added ability to edit a role --- src/client/actions/ActionsManager.js | 1 + src/client/actions/GuildRoleUpdate.js | 44 +++++++++++++++++++ src/client/rest/RESTMethods.js | 43 ++++++++++++++++++ .../packets/handlers/GuildRoleUpdate.js | 12 +---- src/structures/Role.js | 36 +++++++++++++++ test/random.js | 7 ++- 6 files changed, 131 insertions(+), 12 deletions(-) create mode 100644 src/client/actions/GuildRoleUpdate.js diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index e275963b9..850c052d1 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -17,6 +17,7 @@ class ActionsManager { this.register('GuildMemberRemove'); this.register('GuildRoleCreate'); this.register('GuildRoleDelete'); + this.register('GuildRoleUpdate'); this.register('UserUpdate'); } diff --git a/src/client/actions/GuildRoleUpdate.js b/src/client/actions/GuildRoleUpdate.js new file mode 100644 index 000000000..61b269240 --- /dev/null +++ b/src/client/actions/GuildRoleUpdate.js @@ -0,0 +1,44 @@ +'use strict'; + +const Action = require('./Action'); +const Constants = require('../../util/Constants'); +const CloneObject = require('../../util/CloneObject'); +const Message = require('../../structures/Message'); + +class GuildRoleUpdateAction extends Action { + + constructor(client) { + super(client); + } + + handle(data) { + + let client = this.client; + let guild = client.store.get('guilds', data.guild_id); + + let roleData = data.role; + + if (guild) { + let oldRole; + let existingRole = guild.store.get('roles', roleData.id); + // exists and not the same + if (existingRole && !existingRole.equals(roleData)) { + oldRole = CloneObject(existingRole); + existingRole.setup(data.role); + client.emit(Constants.Events.GUILD_ROLE_UPDATE, guild, oldRole, existingRole); + } + + return { + old: oldRole, + updated: existingRole, + }; + } + + return { + old: null, + updated: null, + }; + } +}; + +module.exports = GuildRoleUpdateAction; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 43eaeb9d6..5ddf95198 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -281,6 +281,49 @@ class RESTMethods{ .catch(reject); }); } + + UpdateGuildRole(role, _data) { + return new Promise((resolve, reject) => { + /* + can contain: + name, position, permissions, color, hoist + */ + + let data = {}; + + data.name = _data.name || role.name; + data.position = _data.position || role.position; + data.color = _data.color || role.color; + + if (typeof _data.hoist !== 'undefined') { + data.hoist = _data.hoist; + } else { + data.hoist = role.hoist; + } + + if (_data.permissions) { + let perms = 0; + for (let perm of _data.permissions) { + if (perm instanceof String || typeof perm === 'string') { + perm = Constants.PermissionFlags[perm]; + } + perms |= perm; + } + data.permissions = perms; + } else { + data.permissions = role.permissions; + } + console.log(data); + this.rest.makeRequest('patch', Constants.Endpoints.GUILD_ROLE(role.guild.id, role.id), true, data) + .then(_role => { + resolve(this.rest.client.actions.GuildRoleUpdate.handle({ + role: _role, + guild_id: role.guild.id, + }).updated); + }) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/client/websocket/packets/handlers/GuildRoleUpdate.js b/src/client/websocket/packets/handlers/GuildRoleUpdate.js index 72799a0ea..98005bc02 100644 --- a/src/client/websocket/packets/handlers/GuildRoleUpdate.js +++ b/src/client/websocket/packets/handlers/GuildRoleUpdate.js @@ -18,17 +18,7 @@ class GuildRoleUpdateHandler extends AbstractHandler { let data = packet.d; let client = this.packetManager.client; - let guild = client.store.get('guilds', data.guild_id); - - if (guild) { - let existingRole = guild.store.get('roles', data.role.id); - if (existingRole) { - let oldRole = CloneObject(existingRole); - existingRole.setup(data.role); - client.emit(Constants.Events.GUILD_ROLE_UPDATE, guild, oldRole, existingRole); - } - } - + let response = client.actions.GuildRoleUpdate.handle(data); } }; diff --git a/src/structures/Role.js b/src/structures/Role.js index 864f4ccf6..f163ff98e 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -11,6 +11,18 @@ class Role { } } + equals(role) { + return ( + this.id === role.id && + this.name === role.name && + this.color === role.color && + this.hoist === role.hoist && + this.position === role.position && + this.permissions === role.permissions && + this.managed === role.managed + ); + } + setup(data) { this.id = data.id; this.name = data.name; @@ -25,6 +37,30 @@ class Role { return this.client.rest.methods.DeleteGuildRole(this); } + edit(data) { + return this.client.rest.methods.UpdateGuildRole(this, data); + } + + setName(name) { + return this.client.rest.methods.UpdateGuildRole(this, {name,}); + } + + setColor(color) { + return this.client.rest.methods.UpdateGuildRole(this, {color,}); + } + + setHoist(hoist) { + return this.client.rest.methods.UpdateGuildRole(this, {hoist,}); + } + + setPosition(position) { + return this.client.rest.methods.UpdateGuildRole(this, {position,}); + } + + setPermissions(permissions) { + return this.client.rest.methods.UpdateGuildRole(this, {permissions,}); + } + serialize() { let serializedPermissions = {}; for (let permissionName in Constants.PermissionFlags) { diff --git a/test/random.js b/test/random.js index f84b2865e..a1de4025f 100644 --- a/test/random.js +++ b/test/random.js @@ -41,7 +41,12 @@ client.on('guildMemberRemove', (guild, user) => { client.on('guildRoleCreate', (guild, role) => { console.log('new role', role.name, 'in', guild.name); - role.delete().then(role => console.log("deleted " + role.name)).catch(console.log); + role.edit({ + permissions: ['DEAFEN_MEMBERS'], + name: 'deafen' + }).then(role2 => { + console.log('role replace from ' + role.name + ' to ' + role2.name); + }).catch(console.log) }); client.on('guildRoleDelete', (guild, role) => { From 53d767ec040b0bcf68f59b8fe9e1e42ea60d6b9f Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 13 Aug 2016 12:25:01 +0100 Subject: [PATCH 042/324] some doc stuff idk --- src/client/Client.js | 22 ++++++++++++++++++++++ src/structures/User.js | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/src/client/Client.js b/src/client/Client.js index bd3ba133f..b47fba0c7 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -10,6 +10,13 @@ const ClientDataResolver = require('./ClientDataResolver'); const WebSocketManager = require('./websocket/WebSocketManager'); const ActionsManager = require('./actions/ActionsManager'); +/** + * Creates a new Discord Client + * ```js + * const Discord = require("discord.js"); + * const client = new Discord.Client(); + * ``` + */ class Client extends EventEmitter{ constructor(options) { @@ -23,6 +30,17 @@ class Client extends EventEmitter{ this.actions = new ActionsManager(this); } + /** + * Logs the client in. If successful, resolves with the account's token. + * @param {string} emailOrToken The email or token used for the account. If it is an email, a password _must_ be + * provided. + * @param {string} [password] The password for the account, only needed if an email was provided. + * @return {Promise} + * @example + * client.login("token"); + * // or + * client.login("email", "password"); + */ login(email, password) { if (password) { // login with email and password @@ -33,6 +51,10 @@ class Client extends EventEmitter{ } } + /** + * The User of the logged in Client, only available after `READY` has been fired. + * @return {ClientUser} [description] + */ get user() { return this.store.user; } diff --git a/src/structures/User.js b/src/structures/User.js index e635f4937..2563fccb2 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -2,6 +2,9 @@ const TextBasedChannel = require('./interface/TextBasedChannel'); +/** + * Represents a User on Discord. + */ class User { constructor(client, data) { this.client = client; @@ -11,11 +14,39 @@ class User { } setup(data) { + /** + * The username of the User + * @type {String} + */ this.username = data.username; + /** + * The ID of the User + * @type {String} + */ this.id = data.id; + /** + * A discriminator based on username for the User + * @type {String} + */ this.discriminator = data.discriminator; + /** + * The ID of the user's avatar + * @type {String} + */ this.avatar = data.avatar; + /** + * Whether or not the User is a Bot. + * @type {Boolean} + */ this.bot = Boolean(data.bot); + /** + * The status of the user: + * + * * **`online`** - user is online + * * **`offline`** - user is offline + * * **`idle`** - user is AFK + * @type {String} + */ this.status = data.status || this.status || 'offline'; this.game = data.game || this.game; } @@ -24,6 +55,10 @@ class User { return `<@${this.id}>`; } + /** + * Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful. + * @return {Promise} + */ deleteDM() { return this.client.rest.methods.DeleteChannel(this); } From b8db4c4f4b6c7353a72d059c0ba5a2a136e7bc9a Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 13 Aug 2016 14:44:49 +0100 Subject: [PATCH 043/324] ESLint stuff... --- .eslintrc.js | 16 + package.json | 115 ++-- src/client/Client.js | 125 ++-- src/client/ClientDataResolver.js | 132 ++--- src/client/ClientManager.js | 46 +- src/client/actions/Action.js | 16 +- src/client/actions/ActionsManager.js | 58 +- src/client/actions/ChannelCreate.js | 24 +- src/client/actions/ChannelDelete.js | 80 ++- src/client/actions/ChannelUpdate.js | 50 +- src/client/actions/GuildDelete.js | 79 ++- src/client/actions/GuildMemberRemove.js | 75 ++- src/client/actions/GuildRoleCreate.js | 45 +- src/client/actions/GuildRoleDelete.js | 71 ++- src/client/actions/GuildRoleUpdate.js | 58 +- src/client/actions/GuildUpdate.js | 56 +- src/client/actions/MessageCreate.js | 36 +- src/client/actions/MessageDelete.js | 72 +-- src/client/actions/MessageUpdate.js | 60 +- src/client/actions/UserUpdate.js | 56 +- src/client/rest/RESTManager.js | 163 ++--- src/client/rest/RESTMethods.js | 559 +++++++++--------- src/client/rest/UserAgentManager.js | 32 +- src/client/websocket/WebSocketManager.js | 180 +++--- .../packets/WebSocketPacketManager.js | 153 +++-- .../packets/handlers/AbstractHandler.js | 14 +- .../packets/handlers/ChannelCreate.js | 30 +- .../packets/handlers/ChannelDelete.js | 29 +- .../packets/handlers/ChannelUpdate.js | 42 +- .../websocket/packets/handlers/GuildBanAdd.js | 31 +- .../packets/handlers/GuildBanRemove.js | 30 +- .../websocket/packets/handlers/GuildCreate.js | 45 +- .../websocket/packets/handlers/GuildDelete.js | 30 +- .../packets/handlers/GuildMemberAdd.js | 30 +- .../packets/handlers/GuildMemberRemove.js | 24 +- .../packets/handlers/GuildMemberUpdate.js | 36 +- .../packets/handlers/GuildMembersChunk.js | 34 +- .../packets/handlers/GuildRoleCreate.js | 23 +- .../packets/handlers/GuildRoleDelete.js | 39 +- .../packets/handlers/GuildRoleUpdate.js | 24 +- .../websocket/packets/handlers/GuildUpdate.js | 26 +- .../packets/handlers/MessageCreate.js | 28 +- .../packets/handlers/MessageDelete.js | 28 +- .../packets/handlers/MessageUpdate.js | 25 +- .../packets/handlers/PresenceUpdate.js | 111 ++-- .../websocket/packets/handlers/Ready.js | 43 +- .../websocket/packets/handlers/TypingStart.js | 82 ++- .../websocket/packets/handlers/UserUpdate.js | 26 +- .../packets/handlers/VoiceStateUpdate.js | 57 +- src/index.js | 4 +- src/structures/Channel.js | 36 +- src/structures/ClientUser.js | 46 +- src/structures/DMChannel.js | 52 +- src/structures/EvaluatedPermissions.js | 54 +- src/structures/Guild.js | 374 ++++++------ src/structures/GuildMember.js | 106 ++-- src/structures/Message.js | 198 ++++--- src/structures/PermissionOverwrites.js | 26 +- src/structures/Role.js | 142 +++-- src/structures/ServerChannel.js | 232 ++++---- src/structures/TextChannel.js | 34 +- src/structures/User.js | 144 +++-- src/structures/VoiceChannel.js | 18 +- src/structures/datastore/AbstractDataStore.js | 65 +- src/structures/datastore/ClientDataStore.js | 161 +++-- src/structures/datastore/GuildDataStore.js | 14 +- .../datastore/TextChannelDataStore.js | 12 +- .../datastore/VoiceChannelDataStore.js | 12 +- .../datastore/WebSocketManagerDataStore.js | 16 +- src/structures/interface/TextBasedChannel.js | 15 +- src/util/CloneObject.js | 9 +- src/util/Constants.js | 304 +++++----- src/util/MergeDefault.js | 26 +- test/random.js | 186 +++--- 74 files changed, 2574 insertions(+), 2956 deletions(-) create mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..2ea4a252b --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,16 @@ +module.exports = { + "extends": "airbnb", + "plugins": [ + "react", + "jsx-a11y", + "import" + ], + "rules" : { + "max-len": [2, 120, 2], + "no-underscore-dangle": 0, + "global-require": 0, + "guard-for-in": 0, + "no-restricted-syntax": 0, + "no-param-reassign": 0, + } +}; \ No newline at end of file diff --git a/package.json b/package.json index 36d8e745e..09f090512 100644 --- a/package.json +++ b/package.json @@ -1,55 +1,60 @@ -{ - "name": "discord.js", - "version": "7.0.0", - "description": "A way to interface with the Discord API", - "main": "./src/index", - "scripts": { - "test": "jscs src && node test/random" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hydrabolt/discord.js.git" - }, - "keywords": [ - "discord", - "api", - "bot", - "client", - "node", - "discordapp" - ], - "author": "Amish Shah ", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/hydrabolt/discord.js/issues" - }, - "homepage": "https://github.com/hydrabolt/discord.js#readme", - "dependencies": { - "babel-plugin-transform-runtime": "^6.6.0", - "object.values": "^1.0.3", - "superagent": "^1.5.0", - "unpipe": "^1.0.0", - "ws": "^0.8.1" - }, - "devDependencies": { - "babel-preset-es2015": "^6.6.0", - "babel-preset-stage-3": "^6.5.0", - "grunt": "^0.4.5", - "grunt-babel": "^6.0.0", - "grunt-browserify": "^4.0.1", - "grunt-contrib-uglify": "^0.11.0", - "grunt-jscs": "^2.8.0", - "jscs": "^2.11.0", - "load-grunt-tasks": "^3.3.0" - }, - "optionalDependencies": { - "node-opus": "^0.1.11" - }, - "engines": { - "node": ">=0.12.7" - }, - "browser": { - "./src/Util/TokenCacher.js": "./src/Util/TokenCacher-shim.js", - "./lib/Util/TokenCacher.js": "./lib/Util/TokenCacher-shim.js" - } -} +{ + "name": "discord.js", + "version": "7.0.0", + "description": "A way to interface with the Discord API", + "main": "./src/index", + "scripts": { + "test": "node test/random" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/hydrabolt/discord.js.git" + }, + "keywords": [ + "discord", + "api", + "bot", + "client", + "node", + "discordapp" + ], + "author": "Amish Shah ", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/hydrabolt/discord.js/issues" + }, + "homepage": "https://github.com/hydrabolt/discord.js#readme", + "dependencies": { + "babel-plugin-transform-runtime": "^6.6.0", + "object.values": "^1.0.3", + "superagent": "^1.5.0", + "unpipe": "^1.0.0", + "ws": "^0.8.1" + }, + "devDependencies": { + "babel-preset-es2015": "^6.6.0", + "babel-preset-stage-3": "^6.5.0", + "eslint": "^3.3.0", + "eslint-config-airbnb": "^10.0.1", + "eslint-plugin-import": "^1.13.0", + "eslint-plugin-jsx-a11y": "^2.1.0", + "eslint-plugin-react": "^6.0.0", + "grunt": "^0.4.5", + "grunt-babel": "^6.0.0", + "grunt-browserify": "^4.0.1", + "grunt-contrib-uglify": "^0.11.0", + "grunt-jscs": "^2.8.0", + "jscs": "^2.11.0", + "load-grunt-tasks": "^3.3.0" + }, + "optionalDependencies": { + "node-opus": "^0.1.11" + }, + "engines": { + "node": ">=0.12.7" + }, + "browser": { + "./src/Util/TokenCacher.js": "./src/Util/TokenCacher-shim.js", + "./lib/Util/TokenCacher.js": "./lib/Util/TokenCacher-shim.js" + } +} diff --git a/src/client/Client.js b/src/client/Client.js index b47fba0c7..52ed353a2 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -1,64 +1,61 @@ -'use strict'; - -const EventEmitter = require('events').EventEmitter; -const MergeDefault = require('../util/MergeDefault'); -const Constants = require('../util/Constants'); -const RESTManager = require('./rest/RestManager'); -const ClientDataStore = require('../structures/DataStore/ClientDataStore'); -const ClientManager = require('./ClientManager'); -const ClientDataResolver = require('./ClientDataResolver'); -const WebSocketManager = require('./websocket/WebSocketManager'); -const ActionsManager = require('./actions/ActionsManager'); - -/** - * Creates a new Discord Client - * ```js - * const Discord = require("discord.js"); - * const client = new Discord.Client(); - * ``` - */ -class Client extends EventEmitter{ - - constructor(options) { - super(); - this.options = MergeDefault(Constants.DefaultOptions, options); - this.rest = new RESTManager(this); - this.store = new ClientDataStore(this); - this.manager = new ClientManager(this); - this.ws = new WebSocketManager(this); - this.resolver = new ClientDataResolver(this); - this.actions = new ActionsManager(this); - } - - /** - * Logs the client in. If successful, resolves with the account's token. - * @param {string} emailOrToken The email or token used for the account. If it is an email, a password _must_ be - * provided. - * @param {string} [password] The password for the account, only needed if an email was provided. - * @return {Promise} - * @example - * client.login("token"); - * // or - * client.login("email", "password"); - */ - login(email, password) { - if (password) { - // login with email and password - return this.rest.methods.LoginEmailPassword(email, password); - } else { - // login with token - return this.rest.methods.LoginToken(email); - } - } - - /** - * The User of the logged in Client, only available after `READY` has been fired. - * @return {ClientUser} [description] - */ - get user() { - return this.store.user; - } - -} - -module.exports = Client; +const EventEmitter = require('events').EventEmitter; +const mergeDefault = require('../util/MergeDefault'); +const Constants = require('../util/Constants'); +const RESTManager = require('./rest/RESTManager'); +const ClientDataStore = require('../structures/datastore/ClientDataStore'); +const ClientManager = require('./ClientManager'); +const ClientDataResolver = require('./ClientDataResolver'); +const WebSocketManager = require('./websocket/WebSocketManager'); +const ActionsManager = require('./actions/ActionsManager'); + +/** + * Creates a new Discord Client + * ```js + * const Discord = require("discord.js"); + * const client = new Discord.Client(); + * ``` + */ +class Client extends EventEmitter { + + constructor(options) { + super(); + this.options = mergeDefault(Constants.DefaultOptions, options); + this.rest = new RESTManager(this); + this.store = new ClientDataStore(this); + this.manager = new ClientManager(this); + this.ws = new WebSocketManager(this); + this.resolver = new ClientDataResolver(this); + this.actions = new ActionsManager(this); + } + + /** + * Logs the client in. If successful, resolves with the account's token. + * @param {string} emailOrToken The email or token used for the account. If it is an email, a password _must_ be + * provided. + * @param {string} [password] The password for the account, only needed if an email was provided. + * @return {Promise} + * @example + * client.login("token"); + * // or + * client.login("email", "password"); + */ + login(email, password) { + if (password) { + // login with email and password + return this.rest.methods.loginEmailPassword(email, password); + } + // login with token + return this.rest.methods.loginToken(email); + } + + /** + * The User of the logged in Client, only available after `READY` has been fired. + * @return {ClientUser} [description] + */ + get user() { + return this.store.user; + } + +} + +module.exports = Client; diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index fc65010cf..e7003f468 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -1,90 +1,90 @@ -'use strict'; +const getStructure = name => require(`../structures/${name}`); -const Structure = name => require(`../structures/${name}`); - -const User = Structure('User'); -const Message = Structure('Message'); -const Guild = Structure('Guild'); -const Channel = Structure('Channel'); -const ServerChannel = Structure('ServerChannel'); -const TextChannel = Structure('TextChannel'); -const VoiceChannel = Structure('VoiceChannel'); -const GuildMember = Structure('GuildMember'); +const User = getStructure('User'); +const Message = getStructure('Message'); +const Guild = getStructure('Guild'); +const Channel = getStructure('Channel'); +const GuildMember = getStructure('GuildMember'); function $string(obj) { - return (typeof obj === 'string' || obj instanceof String); + return (typeof obj === 'string' || obj instanceof String); } class ClientDataResolver { - constructor(client) { - this.client = client; - } + constructor(client) { + this.client = client; + } - ResolveUser(user) { - if (user instanceof User) { - return user; - }else if ($string(user)) { - return this.client.store.get('users', user); - }else if (user instanceof Message) { - return user.author; - }else if (user instanceof Guild) { - return user.owner; - } + resolveUser(user) { + if (user instanceof User) { + return user; + } else if ($string(user)) { + return this.client.store.get('users', user); + } else if (user instanceof Message) { + return user.author; + } else if (user instanceof Guild) { + return user.owner; + } - return null; - } + return null; + } - ResolveGuild(guild) { - if (guild instanceof Guild) { - return guild; - } - } + resolveGuild(guild) { + if (guild instanceof Guild) { + return guild; + } + return null; + } - ResolveGuildMember(guild, user) { - if (user instanceof GuildMember) { - return user; - } + resolveGuildMember($guild, $user) { + let guild = $guild; + let user = $user; + if (user instanceof GuildMember) { + return user; + } - guild = this.ResolveGuild(guild); - user = this.ResolveUser(user); + guild = this.resolveGuild(guild); + user = this.resolveUser(user); - if (!guild || !user) { - return null; - } + if (!guild || !user) { + return null; + } - return guild.store.get('members', user.id); - } + return guild.store.get('members', user.id); + } - ResolveBase64(data) { - if (data instanceof Buffer) { - return 'data:image/jpg;base64,' + data.toString('base64'); - } + resolveBase64(data) { + if (data instanceof Buffer) { + return `data:image/jpg;base64,${data.toString('base64')}`; + } - return data; - } + return data; + } - ResolveChannel(channel) { - if (channel instanceof Channel) { - return channel; - } + resolveChannel(channel) { + if (channel instanceof Channel) { + return channel; + } - if ($string(channel)) { - return this.client.store.get('channels', channel); - } - } + if ($string(channel)) { + return this.client.store.get('channels', channel); + } - ResolveString(data) { - if (data instanceof String) { - return data; - } + return null; + } - if (data instanceof Array) { - return data.join('\n'); - } + resolveString(data) { + if (data instanceof String) { + return data; + } - return String(data); - } + if (data instanceof Array) { + return data.join('\n'); + } + + return String(data); + } } module.exports = ClientDataResolver; diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index 00ffc5c69..175e905ad 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -1,34 +1,32 @@ -'use strict'; - const Constants = require('../util/Constants'); class ClientManager { - constructor(client) { - this.client = client; - this.heartbeatInterval = null; - } + constructor(client) { + this.client = client; + this.heartbeatInterval = null; + } - connectToWebSocket(token, resolve, reject) { - this.client.store.token = token; - this.client.rest.methods.GetGateway() - .then(gateway => { - this.client.ws.connect(gateway); - this.client.once(Constants.Events.READY, () => resolve(token)); - }) - .catch(reject); + connectToWebSocket(token, resolve, reject) { + this.client.store.token = token; + this.client.rest.methods.getGateway() + .then(gateway => { + this.client.ws.connect(gateway); + this.client.once(Constants.Events.READY, () => resolve(token)); + }) + .catch(reject); - setTimeout(() => reject(Constants.Errors.TOOK_TOO_LONG), 1000 * 15); - } + setTimeout(() => reject(Constants.Errors.TOOK_TOO_LONG), 1000 * 15); + } - setupKeepAlive(time) { - this.heartbeatInterval = setInterval(() => { - this.client.ws.send({ - op: Constants.OPCodes.HEARTBEAT, - d: Date.now(), - }); - }, time); - } + setupKeepAlive(time) { + this.heartbeatInterval = setInterval(() => { + this.client.ws.send({ + op: Constants.OPCodes.HEARTBEAT, + d: Date.now(), + }); + }, time); + } } module.exports = ClientManager; diff --git a/src/client/actions/Action.js b/src/client/actions/Action.js index 795022b6d..a92fe45fc 100644 --- a/src/client/actions/Action.js +++ b/src/client/actions/Action.js @@ -1,5 +1,3 @@ -'use strict'; - /* ABOUT ACTIONS @@ -14,14 +12,14 @@ that WebSocket events don't clash with REST methods. class GenericAction { - constructor(client) { - this.client = client; - } + constructor(client) { + this.client = client; + } - handle(data) { + handle(data) { + return data; + } - } - -}; +} module.exports = GenericAction; diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index 850c052d1..68112c7d5 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -1,30 +1,28 @@ -'use strict'; - -const requireAction = name => require(`./${name}`); - -class ActionsManager { - constructor(client) { - this.client = client; - - this.register('MessageCreate'); - this.register('MessageDelete'); - this.register('MessageUpdate'); - this.register('ChannelCreate'); - this.register('ChannelDelete'); - this.register('ChannelUpdate'); - this.register('GuildDelete'); - this.register('GuildUpdate'); - this.register('GuildMemberRemove'); - this.register('GuildRoleCreate'); - this.register('GuildRoleDelete'); - this.register('GuildRoleUpdate'); - this.register('UserUpdate'); - } - - register(name) { - let Action = requireAction(name); - this[name] = new Action(this.client); - } -} - -module.exports = ActionsManager; +const requireAction = name => require(`./${name}`); + +class ActionsManager { + constructor(client) { + this.client = client; + + this.register('MessageCreate'); + this.register('MessageDelete'); + this.register('MessageUpdate'); + this.register('ChannelCreate'); + this.register('ChannelDelete'); + this.register('ChannelUpdate'); + this.register('GuildDelete'); + this.register('GuildUpdate'); + this.register('GuildMemberRemove'); + this.register('GuildRoleCreate'); + this.register('GuildRoleDelete'); + this.register('GuildRoleUpdate'); + this.register('UserUpdate'); + } + + register(name) { + const Action = requireAction(name); + this[name] = new Action(this.client); + } +} + +module.exports = ActionsManager; diff --git a/src/client/actions/ChannelCreate.js b/src/client/actions/ChannelCreate.js index 53c1d4325..09cbec54f 100644 --- a/src/client/actions/ChannelCreate.js +++ b/src/client/actions/ChannelCreate.js @@ -1,23 +1,15 @@ -'use strict'; - const Action = require('./Action'); -const Constants = require('../../util/Constants'); -const Message = require('../../structures/Message'); class ChannelCreateAction extends Action { - constructor(client) { - super(client); - } + handle(data) { + const client = this.client; + const channel = client.store.newChannel(data); - handle(data) { - let client = this.client; - let channel = client.store.NewChannel(data); - - return { - channel, - }; - } -}; + return { + channel, + }; + } +} module.exports = ChannelCreateAction; diff --git a/src/client/actions/ChannelDelete.js b/src/client/actions/ChannelDelete.js index 36b6d0231..5ecd5c03d 100644 --- a/src/client/actions/ChannelDelete.js +++ b/src/client/actions/ChannelDelete.js @@ -1,44 +1,36 @@ -'use strict'; - -const Action = require('./Action'); -const Constants = require('../../util/Constants'); -const Message = require('../../structures/Message'); - -class ChannelDeleteAction extends Action { - - constructor(client) { - super(client); - this.timeouts = []; - this.deleted = {}; - } - - handle(data) { - let client = this.client; - let channel = client.store.get('channels', data.id); - - if (channel) { - - client.store.KillChannel(channel); - this.deleted[channel.id] = channel; - this.scheduleForDeletion(channel.id); - - } else if (this.deleted[data.id]) { - - channel = this.deleted[data.id]; - - } - - return { - channel, - }; - } - - scheduleForDeletion(id) { - this.timeouts.push( - setTimeout(() => delete this.deleted[id], - this.client.options.rest_ws_bridge_timeout) - ); - } -}; - -module.exports = ChannelDeleteAction; +const Action = require('./Action'); + +class ChannelDeleteAction extends Action { + + constructor(client) { + super(client); + this.timeouts = []; + this.deleted = {}; + } + + handle(data) { + const client = this.client; + let channel = client.store.get('channels', data.id); + + if (channel) { + client.store.killChannel(channel); + this.deleted[channel.id] = channel; + this.scheduleForDeletion(channel.id); + } else if (this.deleted[data.id]) { + channel = this.deleted[data.id]; + } + + return { + channel, + }; + } + + scheduleForDeletion(id) { + this.timeouts.push( + setTimeout(() => delete this.deleted[id], + this.client.options.rest_ws_bridge_timeout) + ); + } +} + +module.exports = ChannelDeleteAction; diff --git a/src/client/actions/ChannelUpdate.js b/src/client/actions/ChannelUpdate.js index 78d02245e..f7a855b6b 100644 --- a/src/client/actions/ChannelUpdate.js +++ b/src/client/actions/ChannelUpdate.js @@ -1,39 +1,31 @@ -'use strict'; - const Action = require('./Action'); const Constants = require('../../util/Constants'); -const CloneObject = require('../../util/CloneObject'); -const Message = require('../../structures/Message'); +const cloneObject = require('../../util/CloneObject'); class ChannelUpdateAction extends Action { - constructor(client) { - super(client); - } + handle(data) { + const client = this.client; + const channel = client.store.get('channels', data.id); - handle(data) { + if (channel) { + const oldChannel = cloneObject(channel); + channel.setup(data); + if (!oldChannel.equals(data)) { + client.emit(Constants.Events.CHANNEL_UPDATE, oldChannel, channel); + } - let client = this.client; - let channel = client.store.get('channels', data.id); + return { + old: oldChannel, + updated: channel, + }; + } - if (channel) { - let oldChannel = CloneObject(channel); - channel.setup(data); - if (!oldChannel.equals(data)) { - client.emit(Constants.Events.CHANNEL_UPDATE, oldChannel, channel); - } - - return { - old: oldChannel, - updated: channel, - }; - } - - return { - old: null, - updated: null, - }; - } -}; + return { + old: null, + updated: null, + }; + } +} module.exports = ChannelUpdateAction; diff --git a/src/client/actions/GuildDelete.js b/src/client/actions/GuildDelete.js index 271cb7b52..0e040dc4a 100644 --- a/src/client/actions/GuildDelete.js +++ b/src/client/actions/GuildDelete.js @@ -1,54 +1,49 @@ -'use strict'; - const Action = require('./Action'); const Constants = require('../../util/Constants'); -const Message = require('../../structures/Message'); class GuildDeleteAction extends Action { - constructor(client) { - super(client); - this.deleted = {}; - this.timeouts = []; - } + constructor(client) { + super(client); + this.deleted = {}; + this.timeouts = []; + } - handle(data) { + handle(data) { + const client = this.client; + let guild = client.store.get('guilds', data.id); - let client = this.client; - let guild = client.store.get('guilds', data.id); + if (guild) { + if (guild.available && data.unavailable) { + // guild is unavailable + guild.available = false; + client.emit(Constants.Events.GUILD_UNAVAILABLE, guild); - if (guild) { - if (guild.available && data.unavailable) { - // guild is unavailable - guild.available = false; - client.emit(Constants.Events.GUILD_UNAVAILABLE, guild); + // stops the GuildDelete packet thinking a guild was actually deleted, + // handles emitting of event itself + return { + guild: null, + }; + } + // delete guild + client.store.remove('guilds', guild); + this.deleted[guild.id] = guild; + this.scheduleForDeletion(guild.id); + } else if (this.deleted[data.id]) { + guild = this.deleted[data.id]; + } - // stops the GuildDelete packet thinking a guild was actually deleted, - // handles emitting of event itself - return { - guild: null, - }; - } else { - // delete guild - client.store.remove('guilds', guild); - this.deleted[guild.id] = guild; - this.scheduleForDeletion(guild.id); - } - } else if (this.deleted[data.id]) { - guild = this.deleted[data.id]; - } + return { + guild, + }; + } - return { - guild, - }; - } - - scheduleForDeletion(id) { - this.timeouts.push( - setTimeout(() => delete this.deleted[id], - this.client.options.rest_ws_bridge_timeout) - ); - } -}; + scheduleForDeletion(id) { + this.timeouts.push( + setTimeout(() => delete this.deleted[id], + this.client.options.rest_ws_bridge_timeout) + ); + } +} module.exports = GuildDeleteAction; diff --git a/src/client/actions/GuildMemberRemove.js b/src/client/actions/GuildMemberRemove.js index 7ef912467..f5e965463 100644 --- a/src/client/actions/GuildMemberRemove.js +++ b/src/client/actions/GuildMemberRemove.js @@ -1,51 +1,48 @@ -'use strict'; - const Action = require('./Action'); const Constants = require('../../util/Constants'); -const Message = require('../../structures/Message'); class GuildMemberRemoveAction extends Action { - constructor(client) { - super(client); - this.timeouts = []; - this.deleted = {}; - } + constructor(client) { + super(client); + this.timeouts = []; + this.deleted = {}; + } - handle(data) { - let client = this.client; - let guild = client.store.get('guilds', data.guild_id); - if (guild) { - let member = guild.store.get('members', data.user.id); - if (member) { - guild._removeMember(member); - this.deleted[guild.id + data.user.id] = member; - client.emit(Constants.Events.GUILD_MEMBER_REMOVE, guild, member); - this.scheduleForDeletion(guild.id, data.user.id); - } + handle(data) { + const client = this.client; + const guild = client.store.get('guilds', data.guild_id); + if (guild) { + let member = guild.store.get('members', data.user.id); + if (member) { + guild._removeMember(member); + this.deleted[guild.id + data.user.id] = member; + client.emit(Constants.Events.GUILD_MEMBER_REMOVE, guild, member); + this.scheduleForDeletion(guild.id, data.user.id); + } - if (!member) { - member = this.deleted[guild.id + data.user.id]; - } + if (!member) { + member = this.deleted[guild.id + data.user.id]; + } - return { - g: guild, - m: member, - }; - } + return { + g: guild, + m: member, + }; + } - return { - g: guild, - m: null, - }; - } + return { + g: guild, + m: null, + }; + } - scheduleForDeletion(guildID, userID) { - this.timeouts.push( - setTimeout(() => delete this.deleted[guildID + userID], - this.client.options.rest_ws_bridge_timeout) - ); - } -}; + scheduleForDeletion(guildID, userID) { + this.timeouts.push( + setTimeout(() => delete this.deleted[guildID + userID], + this.client.options.rest_ws_bridge_timeout) + ); + } +} module.exports = GuildMemberRemoveAction; diff --git a/src/client/actions/GuildRoleCreate.js b/src/client/actions/GuildRoleCreate.js index 0a929d351..601e24266 100644 --- a/src/client/actions/GuildRoleCreate.js +++ b/src/client/actions/GuildRoleCreate.js @@ -1,38 +1,31 @@ -'use strict'; - const Action = require('./Action'); const Constants = require('../../util/Constants'); const Role = require('../../structures/Role'); class GuildRoleCreate extends Action { - constructor(client) { - super(client); - } + handle(data) { + const client = this.client; + const guild = client.store.get('guilds', data.guild_id); - handle(data) { + if (guild) { + const already = guild.store.get('roles', data.role.id); + const role = new Role(guild, data.role); + guild.store.add('roles', role); - let client = this.client; - let guild = client.store.get('guilds', data.guild_id); + if (!already) { + client.emit(Constants.Events.GUILD_ROLE_CREATE, guild, role); + } - if (guild) { - let already = guild.store.get('roles', data.role.id); - let role = new Role(guild, data.role); - guild.store.add('roles', role); + return { + role, + }; + } - if (!already) { - client.emit(Constants.Events.GUILD_ROLE_CREATE, guild, role); - } - - return { - role, - }; - } - - return { - role: null, - }; - } -}; + return { + role: null, + }; + } +} module.exports = GuildRoleCreate; diff --git a/src/client/actions/GuildRoleDelete.js b/src/client/actions/GuildRoleDelete.js index 687305b30..e27f81639 100644 --- a/src/client/actions/GuildRoleDelete.js +++ b/src/client/actions/GuildRoleDelete.js @@ -1,50 +1,47 @@ -'use strict'; - const Action = require('./Action'); const Constants = require('../../util/Constants'); -const Message = require('../../structures/Message'); class GuildRoleDeleteAction extends Action { - constructor(client) { - super(client); - this.timeouts = []; - this.deleted = {}; - } + constructor(client) { + super(client); + this.timeouts = []; + this.deleted = {}; + } - handle(data) { - let client = this.client; - let guild = client.store.get('guilds', data.guild_id); + handle(data) { + const client = this.client; + const guild = client.store.get('guilds', data.guild_id); - if (guild) { - let exists = guild.store.get('roles', data.role_id); - if (exists) { - guild.store.remove('roles', data.role_id); - this.deleted[guild.id + data.role_id] = exists; - this.scheduleForDeletion(guild.id, data.role_id); - client.emit(Constants.Events.GUILD_ROLE_DELETE, guild, exists); - } + if (guild) { + let exists = guild.store.get('roles', data.role_id); + if (exists) { + guild.store.remove('roles', data.role_id); + this.deleted[guild.id + data.role_id] = exists; + this.scheduleForDeletion(guild.id, data.role_id); + client.emit(Constants.Events.GUILD_ROLE_DELETE, guild, exists); + } - if (!exists) { - exists = this.deleted[guild.id + data.role_id]; - } + if (!exists) { + exists = this.deleted[guild.id + data.role_id]; + } - return { - role: exists, - }; - } + return { + role: exists, + }; + } - return { - role: null, - }; - } + return { + role: null, + }; + } - scheduleForDeletion(guildID, roleID) { - this.timeouts.push( - setTimeout(() => delete this.deleted[guildID + roleID], - this.client.options.rest_ws_bridge_timeout) - ); - } -}; + scheduleForDeletion(guildID, roleID) { + this.timeouts.push( + setTimeout(() => delete this.deleted[guildID + roleID], + this.client.options.rest_ws_bridge_timeout) + ); + } +} module.exports = GuildRoleDeleteAction; diff --git a/src/client/actions/GuildRoleUpdate.js b/src/client/actions/GuildRoleUpdate.js index 61b269240..14a896724 100644 --- a/src/client/actions/GuildRoleUpdate.js +++ b/src/client/actions/GuildRoleUpdate.js @@ -1,44 +1,36 @@ -'use strict'; - const Action = require('./Action'); const Constants = require('../../util/Constants'); -const CloneObject = require('../../util/CloneObject'); -const Message = require('../../structures/Message'); +const cloneObject = require('../../util/CloneObject'); class GuildRoleUpdateAction extends Action { - constructor(client) { - super(client); - } + handle(data) { + const client = this.client; + const guild = client.store.get('guilds', data.guild_id); - handle(data) { + const roleData = data.role; - let client = this.client; - let guild = client.store.get('guilds', data.guild_id); + if (guild) { + let oldRole; + const existingRole = guild.store.get('roles', roleData.id); + // exists and not the same + if (existingRole && !existingRole.equals(roleData)) { + oldRole = cloneObject(existingRole); + existingRole.setup(data.role); + client.emit(Constants.Events.GUILD_ROLE_UPDATE, guild, oldRole, existingRole); + } - let roleData = data.role; + return { + old: oldRole, + updated: existingRole, + }; + } - if (guild) { - let oldRole; - let existingRole = guild.store.get('roles', roleData.id); - // exists and not the same - if (existingRole && !existingRole.equals(roleData)) { - oldRole = CloneObject(existingRole); - existingRole.setup(data.role); - client.emit(Constants.Events.GUILD_ROLE_UPDATE, guild, oldRole, existingRole); - } - - return { - old: oldRole, - updated: existingRole, - }; - } - - return { - old: null, - updated: null, - }; - } -}; + return { + old: null, + updated: null, + }; + } +} module.exports = GuildRoleUpdateAction; diff --git a/src/client/actions/GuildUpdate.js b/src/client/actions/GuildUpdate.js index 96ab7565e..a7a2775de 100644 --- a/src/client/actions/GuildUpdate.js +++ b/src/client/actions/GuildUpdate.js @@ -1,42 +1,38 @@ -'use strict'; - const Action = require('./Action'); const Constants = require('../../util/Constants'); -const CloneObject = require('../../util/CloneObject'); -const Message = require('../../structures/Message'); +const cloneObject = require('../../util/CloneObject'); class GuildUpdateAction extends Action { - constructor(client) { - super(client); - this.deleted = {}; - this.timeouts = []; - } + constructor(client) { + super(client); + this.deleted = {}; + this.timeouts = []; + } - handle(data) { + handle(data) { + const client = this.client; + const guild = client.store.get('guilds', data.id); - let client = this.client; - let guild = client.store.get('guilds', data.id); + if (guild) { + const oldGuild = cloneObject(guild); + guild.setup(data); - if (guild) { - let oldGuild = CloneObject(guild); - guild.setup(data); + if (!oldGuild.equals(data)) { + client.emit(Constants.Events.GUILD_UPDATE, oldGuild, guild); + } - if (!oldGuild.equals(data)) { - client.emit(Constants.Events.GUILD_UPDATE, oldGuild, guild); - } + return { + old: oldGuild, + updated: guild, + }; + } - return { - old: oldGuild, - updated: guild, - }; - } - - return { - old: null, - updated: null, - }; - } -}; + return { + old: null, + updated: null, + }; + } +} module.exports = GuildUpdateAction; diff --git a/src/client/actions/MessageCreate.js b/src/client/actions/MessageCreate.js index 55bae8b4e..75f5e25f0 100644 --- a/src/client/actions/MessageCreate.js +++ b/src/client/actions/MessageCreate.js @@ -1,31 +1,23 @@ -'use strict'; - const Action = require('./Action'); -const Constants = require('../../util/Constants'); const Message = require('../../structures/Message'); class MessageCreateAction extends Action { - constructor(client) { - super(client); - } + handle(data) { + const client = this.client; + const channel = client.store.get('channels', data.channel_id); - handle(data) { + if (channel) { + const message = channel._cacheMessage(new Message(channel, data, client)); + return { + m: message, + }; + } - let client = this.client; - let channel = client.store.get('channels', data.channel_id); - - if (channel) { - let message = channel._cacheMessage(new Message(channel, data, client)); - return { - m: message, - }; - } - - return { - m: null, - }; - } -}; + return { + m: null, + }; + } +} module.exports = MessageCreateAction; diff --git a/src/client/actions/MessageDelete.js b/src/client/actions/MessageDelete.js index a8a2f8e04..bbd9e00e3 100644 --- a/src/client/actions/MessageDelete.js +++ b/src/client/actions/MessageDelete.js @@ -1,51 +1,43 @@ -'use strict'; - const Action = require('./Action'); -const Constants = require('../../util/Constants'); -const Message = require('../../structures/Message'); class MessageDeleteAction extends Action { - constructor(client) { - super(client); - this.timeouts = []; - this.deleted = {}; - } + constructor(client) { + super(client); + this.timeouts = []; + this.deleted = {}; + } - handle(data) { - let client = this.client; - let channel = client.store.get('channels', data.channel_id); - if (channel) { - let message = channel.store.get('messages', data.id); + handle(data) { + const client = this.client; + const channel = client.store.get('channels', data.channel_id); + if (channel) { + let message = channel.store.get('messages', data.id); - if (message) { + if (message) { + channel.store.remove('messages', message.id); + this.deleted[channel.id + message.id] = message; + this.scheduleForDeletion(channel.id, message.id); + } else if (this.deleted[channel.id + data.id]) { + message = this.deleted[channel.id + data.id]; + } - channel.store.remove('messages', message.id); - this.deleted[channel.id + message.id] = message; - this.scheduleForDeletion(channel.id, message.id); + return { + m: message, + }; + } - } else if (this.deleted[channel.id + data.id]) { + return { + m: null, + }; + } - message = this.deleted[channel.id + data.id]; - - } - - return { - m: message, - }; - } - - return { - m: null, - }; - } - - scheduleForDeletion(channelID, messageID) { - this.timeouts.push( - setTimeout(() => delete this.deleted[channelID + messageID], - this.client.options.rest_ws_bridge_timeout) - ); - } -}; + scheduleForDeletion(channelID, messageID) { + this.timeouts.push( + setTimeout(() => delete this.deleted[channelID + messageID], + this.client.options.rest_ws_bridge_timeout) + ); + } +} module.exports = MessageDeleteAction; diff --git a/src/client/actions/MessageUpdate.js b/src/client/actions/MessageUpdate.js index 67c1d79f6..3d5854ba9 100644 --- a/src/client/actions/MessageUpdate.js +++ b/src/client/actions/MessageUpdate.js @@ -1,44 +1,36 @@ -'use strict'; - const Action = require('./Action'); const Constants = require('../../util/Constants'); -const CloneObject = require('../../util/CloneObject'); -const Message = require('../../structures/Message'); +const cloneObject = require('../../util/CloneObject'); class MessageUpdateAction extends Action { - constructor(client) { - super(client); - } + handle(data) { + const client = this.client; + const channel = client.store.get('channels', data.channel_id); - handle(data) { + if (channel) { + const message = channel.store.get('messages', data.id); + if (message && !message.equals(data, true)) { + const oldMessage = cloneObject(message); + message.patch(data); + client.emit(Constants.Events.MESSAGE_UPDATE, oldMessage, message); + return { + old: oldMessage, + updated: message, + }; + } - let client = this.client; - let channel = client.store.get('channels', data.channel_id); + return { + old: message, + updated: message, + }; + } - if (channel) { - let message = channel.store.get('messages', data.id); - if (message && !message.equals(data, true)) { - let oldMessage = CloneObject(message); - message.patch(data); - return { - old: oldMessage, - updated: message, - }; - client.emit(Constants.Events.MESSAGE_UPDATE, oldMessage, message); - } - - return { - old: message, - updated: message, - }; - } - - return { - old: null, - updated: null, - }; - } -}; + return { + old: null, + updated: null, + }; + } +} module.exports = MessageUpdateAction; diff --git a/src/client/actions/UserUpdate.js b/src/client/actions/UserUpdate.js index ec3a42cb6..7c10a9297 100644 --- a/src/client/actions/UserUpdate.js +++ b/src/client/actions/UserUpdate.js @@ -1,44 +1,36 @@ -'use strict'; - const Action = require('./Action'); const Constants = require('../../util/Constants'); -const CloneObject = require('../../util/CloneObject'); -const Message = require('../../structures/Message'); +const cloneObject = require('../../util/CloneObject'); class UserUpdateAction extends Action { - constructor(client) { - super(client); - } + handle(data) { + const client = this.client; - handle(data) { + if (client.store.user) { + if (client.store.user.equals(data)) { + return { + old: client.store.user, + updated: client.store.user, + }; + } - let client = this.client; + const oldUser = cloneObject(client.store.user); + client.store.user.setup(data); - if (client.store.user) { - if (client.store.user.equals(data)) { - return { - old: client.store.user, - updated: client.store.user, - }; - } + client.emit(Constants.Events.USER_UPDATE, oldUser, client.store.user); - let oldUser = CloneObject(client.store.user); - client.store.user.setup(data); + return { + old: oldUser, + updated: client.store.user, + }; + } - client.emit(Constants.Events.USER_UPDATE, oldUser, client.store.user); - - return { - old: oldUser, - updated: client.store.user, - }; - } - - return { - old: null, - updated: null, - }; - } -}; + return { + old: null, + updated: null, + }; + } +} module.exports = UserUpdateAction; diff --git a/src/client/rest/RESTManager.js b/src/client/rest/RESTManager.js index 60c021a47..768367219 100644 --- a/src/client/rest/RESTManager.js +++ b/src/client/rest/RESTManager.js @@ -1,105 +1,110 @@ -'use strict'; - const request = require('superagent'); const Constants = require('../../util/Constants'); const UserAgentManager = require('./UserAgentManager'); const RESTMethods = require('./RESTMethods'); -class RESTManager{ +class RESTManager { - constructor(client) { - this.client = client; - this.queue = []; - this.userAgentManager = new UserAgentManager(this); - this.methods = new RESTMethods(this); - this.rateLimitedEndpoints = {}; - } + constructor(client) { + this.client = client; + this.queue = []; + this.userAgentManager = new UserAgentManager(this); + this.methods = new RESTMethods(this); + this.rateLimitedEndpoints = {}; + } - addRequestToQueue(method, url, auth, data, file, resolve, reject) { - let endpoint = url.replace(/\/[0-9]+/g, '/:id'); + addRequestToQueue(method, url, auth, data, file, resolve, reject) { + const endpoint = url.replace(/\/[0-9]+/g, '/:id'); - let rateLimitedEndpoint = this.rateLimitedEndpoints[endpoint]; + const rateLimitedEndpoint = this.rateLimitedEndpoints[endpoint]; - rateLimitedEndpoint.queue = rateLimitedEndpoint.queue || []; + rateLimitedEndpoint.queue = rateLimitedEndpoint.queue || []; - rateLimitedEndpoint.queue.push({ - method, url, auth, data, file, resolve, reject, - }); - } + rateLimitedEndpoint.queue.push({ + method, + url, + auth, + data, + file, + resolve, + reject, + }); + } - processQueue(endpoint) { - let rateLimitedEndpoint = this.rateLimitedEndpoints[endpoint]; + processQueue(endpoint) { + const rateLimitedEndpoint = this.rateLimitedEndpoints[endpoint]; - // prevent multiple queue processes - if (!rateLimitedEndpoint.timeout) { - return; - } + // prevent multiple queue processes + if (!rateLimitedEndpoint.timeout) { + return; + } - // lock the queue - clearTimeout(rateLimitedEndpoint.timeout); - rateLimitedEndpoint.timeout = null; + // lock the queue + clearTimeout(rateLimitedEndpoint.timeout); + rateLimitedEndpoint.timeout = null; - for (let item of rateLimitedEndpoint.queue) { - this.makeRequest(item.method, item.url, item.auth, item.data, item.file) - .then(item.resolve) - .catch(item.reject); - } + for (const item of rateLimitedEndpoint.queue) { + this.makeRequest(item.method, item.url, item.auth, item.data, item.file) + .then(item.resolve) + .catch(item.reject); + } - rateLimitedEndpoint.queue = []; - } + rateLimitedEndpoint.queue = []; + } - makeRequest(method, url, auth, data, file, fromQueue) { - /* - file is {file, name} - */ - let apiRequest = request[method](url); + makeRequest(method, url, auth, data, file) { + /* + file is {file, name} + */ + console.log(url); + const apiRequest = request[method](url); - let endpoint = url.replace(/\/[0-9]+/g, '/:id'); + const endpoint = url.replace(/\/[0-9]+/g, '/:id'); - if (this.rateLimitedEndpoints[endpoint] && this.rateLimitedEndpoints[endpoint].timeout) { - return new Promise((resolve, reject) => { - this.addRequestToQueue(method, url, auth, data, file, resolve, reject); - }); - } + if (this.rateLimitedEndpoints[endpoint] && this.rateLimitedEndpoints[endpoint].timeout) { + return new Promise((resolve, reject) => { + this.addRequestToQueue(method, url, auth, data, file, resolve, reject); + }); + } - if (auth) { - if (this.client.store.token) { - apiRequest.set('authorization', this.client.store.token); - } else { - throw Constants.Errors.NO_TOKEN; - } - } + if (auth) { + if (this.client.store.token) { + apiRequest.set('authorization', this.client.store.token); + } else { + throw Constants.Errors.NO_TOKEN; + } + } - if (data) { - apiRequest.send(data); - } + if (data) { + apiRequest.send(data); + } - if (file) { - apiRequest.attach('file', file.file, file.name); - } + if (file) { + apiRequest.attach('file', file.file, file.name); + } - apiRequest.set('User-Agent', this.userAgentManager.userAgent); + apiRequest.set('User-Agent', this.userAgentManager.userAgent); - return new Promise((resolve, reject) => { - apiRequest.end((err, res) => { - if (err) { - let retry = res.headers['retry-after'] || res.headers['Retry-After']; - if (retry) { - this.rateLimitedEndpoints[endpoint] = {}; - this.addRequestToQueue(method, url, auth, data, file, resolve, reject); - this.rateLimitedEndpoints[endpoint].timeout = setTimeout(() => { - this.processQueue(endpoint); - }, retry); - return; - } + return new Promise((resolve, reject) => { + apiRequest.end((err, res) => { + if (err) { + const retry = res.headers['retry-after'] || res.headers['Retry-After']; + if (retry) { + this.rateLimitedEndpoints[endpoint] = {}; + this.addRequestToQueue(method, url, auth, data, file, resolve, reject); + this.rateLimitedEndpoints[endpoint].timeout = setTimeout(() => { + this.processQueue(endpoint); + }, retry); + return; + } - reject(err); - } else { - resolve(res ? res.body || {} : {}); - } - }); - }); - } -}; + reject(err); + } else { + resolve(res ? res.body || {} : {}); + } + }); + }); + } +} module.exports = RESTManager; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 5ddf95198..9eff9d3d1 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -1,329 +1,328 @@ -'use strict'; - const Constants = require('../../util/Constants'); -const Structure = name => require('../../structures/' + name); -const User = Structure('User'); -const GuildMember = Structure('GuildMember'); -const Message = Structure('Message'); -class RESTMethods{ - constructor(restManager) { - this.rest = restManager; - } +const getStructure = name => require(`../../structures/${name}`); +const User = getStructure('User'); +const GuildMember = getStructure('GuildMember'); - LoginEmailPassword(email, password) { - return new Promise((resolve, reject) => { - this.rest.client.store.email = email; - this.rest.client.store.password = password; - this.rest.makeRequest('post', Constants.Endpoints.LOGIN, false, { email, password }) - .then(data => { - this.rest.client.manager.connectToWebSocket(data.token, resolve, reject); - }) - .catch(reject); +class RESTMethods { + constructor(restManager) { + this.rest = restManager; + } - }); - } + loginEmailPassword(email, password) { + return new Promise((resolve, reject) => { + this.rest.client.store.email = email; + this.rest.client.store.password = password; + this.rest.makeRequest('post', Constants.Endpoints.login, false, { email, password }) + .then(data => { + this.rest.client.manager.connectToWebSocket(data.token, resolve, reject); + }) + .catch(reject); + }); + } - LoginToken(token) { - return new Promise((resolve, reject) => { - this.rest.client.manager.connectToWebSocket(token, resolve, reject); - }); - } + loginToken(token) { + return new Promise((resolve, reject) => { + this.rest.client.manager.connectToWebSocket(token, resolve, reject); + }); + } - GetGateway() { - return new Promise((resolve, reject) => { - this.rest.makeRequest('get', Constants.Endpoints.GATEWAY, true) - .then(res => resolve(res.url)) - .catch(reject); - }); - } + getGateway() { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.gateway, true) + .then(res => resolve(res.url)) + .catch(reject); + }); + } - SendMessage(channel, content, tts, nonce) { - return new Promise((resolve, reject) => { + sendMessage($channel, content, tts, nonce) { + return new Promise((resolve, reject) => { + const $this = this; + let channel = $channel; - var _this = this; + function req() { + $this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, { + content, tts, nonce, + }) + .then(data => resolve($this.rest.client.actions.MessageCreate.handle(data).m)) + .catch(reject); + } - if (channel instanceof User || channel instanceof GuildMember) { - this.CreateDM(channel).then(chan => { - channel = chan; - req(); - }) - .catch(reject); - } else { - req(); - } + if (channel instanceof User || channel instanceof GuildMember) { + this.createDM(channel).then(chan => { + channel = chan; + req(); + }) + .catch(reject); + } else { + req(); + } + }); + } - function req() { - _this.rest.makeRequest('post', Constants.Endpoints.CHANNEL_MESSAGES(channel.id), true, { - content, tts, nonce, - }) - .then(data => resolve(_this.rest.client.actions.MessageCreate.handle(data).m)) - .catch(reject); - } - }); - } + deleteMessage(message) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.channelMessage(message.channel.id, message.id), true) + .then(() => { + resolve(this.rest.client.actions.MessageDelete.handle({ + id: message.id, + channel_id: message.channel.id, + }).m); + }) + .catch(reject); + }); + } - DeleteMessage(message) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.CHANNEL_MESSAGE(message.channel.id, message.id), true) - .then(data => { - resolve(this.rest.client.actions.MessageDelete.handle({ - id: message.id, - channel_id: message.channel.id, - }).m); - }) - .catch(reject); - }); - } + updateMessage(message, content) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('patch', Constants.Endpoints.channelMessage(message.channel.id, message.id), true, { + content, + }) + .then(data => { + resolve(this.rest.client.actions.MessageUpdate.handle(data).updated); + }) + .catch(reject); + }); + } - UpdateMessage(message, content) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('patch', Constants.Endpoints.CHANNEL_MESSAGE(message.channel.id, message.id), true, { - content, - }) - .then(data => { - resolve(this.rest.client.actions.MessageUpdate.handle(data).updated); - }) - .catch(reject); - }); - } + createChannel(guild, channelName, channelType) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('post', Constants.Endpoints.guildChannels(guild.id), true, { + name: channelName, + type: channelType, + }) + .then(data => { + resolve(this.rest.client.actions.ChannelCreate.handle(data).channel); + }) + .catch(reject); + }); + } - CreateChannel(guild, channelName, channelType) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('post', Constants.Endpoints.GUILD_CHANNELS(guild.id), true, { - name: channelName, - type: channelType, - }) - .then(data => { - resolve(this.rest.client.actions.ChannelCreate.handle(data).channel); - }) - .catch(reject); - }); - } + getExistingDM(recipient) { + const dmChannel = this.rest.client.store.getAsArray('channels') + .filter(channel => channel.recipient) + .filter(channel => channel.recipient.id === recipient.id); - GetExistingDM(recipient) { - let dmChannel = this.rest.client.store.getAsArray('channels') - .filter(channel => channel.recipient) - .filter(channel => channel.recipient.id === recipient.id); + return dmChannel[0]; + } - return dmChannel[0]; - } + createDM(recipient) { + return new Promise((resolve, reject) => { + const dmChannel = this.getExistingDM(recipient); - CreateDM(recipient) { - return new Promise((resolve, reject) => { + if (dmChannel) { + return resolve(dmChannel); + } - let dmChannel = this.GetExistingDM(recipient); + return this.rest.makeRequest('post', Constants.Endpoints.userChannels(this.rest.client.store.user.id), true, { + recipient_id: recipient.id, + }) + .then(data => resolve(this.rest.client.actions.ChannelCreate.handle(data).channel)) + .catch(reject); + }); + } - if (dmChannel) { - return resolve(dmChannel); - } + deleteChannel($channel) { + let channel = $channel; + return new Promise((resolve, reject) => { + if (channel instanceof User || channel instanceof GuildMember) { + channel = this.getExistingDM(channel); + } - this.rest.makeRequest('post', Constants.Endpoints.USER_CHANNELS(this.rest.client.store.user.id), true, { - recipient_id: recipient.id, - }) - .then(data => resolve(this.rest.client.actions.ChannelCreate.handle(data).channel)) - .catch(reject); - }); - } + this.rest.makeRequest('del', Constants.Endpoints.channel(channel.id), true) + .then($data => { + const data = $data; + data.id = channel.id; + resolve(this.rest.client.actions.ChannelDelete.handle(data).channel); + }) + .catch(reject); + }); + } - DeleteChannel(channel) { - return new Promise((resolve, reject) => { - if (channel instanceof User || channel instanceof GuildMember) { - channel = this.GetExistingDM(channel); - } + updateChannel(channel, $data) { + const data = $data; + return new Promise((resolve, reject) => { + data.name = (data.name || channel.name).trim(); + data.topic = data.topic || channel.topic; + data.position = data.position || channel.position; + data.bitrate = data.bitrate || channel.bitrate; - this.rest.makeRequest('del', Constants.Endpoints.CHANNEL(channel.id), true) - .then(data => { - data.id = channel.id; - resolve(this.rest.client.actions.ChannelDelete.handle(data).channel); - }) - .catch(reject); - }); - } + this.rest.makeRequest('patch', Constants.Endpoints.channel(channel.id), true, data) + .then(newData => { + resolve(this.rest.client.actions.ChannelUpdate.handle(newData).updated); + }) + .catch(reject); + }); + } - UpdateChannel(channel, data) { - return new Promise((resolve, reject) => { - data.name = (data.name || channel.name).trim(); - data.topic = data.topic || channel.topic; - data.position = data.position || channel.position; - data.bitrate = data.bitrate || channel.bitrate; + leaveGuild(guild) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.meGuild(guild.id), true) + .then(() => { + resolve(this.rest.client.actions.GuildDelete.handle({ id: guild.id }).guild); + }) + .catch(reject); + }); + } - this.rest.makeRequest('patch', Constants.Endpoints.CHANNEL(channel.id), true, data) - .then(data => { - resolve(this.rest.client.actions.ChannelUpdate.handle(data).updated); - }) - .catch(reject); - }); - } + // untested but probably will work + deleteGuild(guild) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.guild(guild.id), true) + .then(() => { + resolve(this.rest.client.actions.GuildDelete.handle({ id: guild.id }).guild); + }) + .catch(reject); + }); + } - LeaveGuild(guild) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.ME_GUILD(guild.id), true) - .then(() => { - resolve(this.rest.client.actions.GuildDelete.handle({ id:guild.id }).guild); - }) - .catch(reject); - }); - } + updateCurrentUser(_data) { + return new Promise((resolve, reject) => { + const user = this.rest.client.store.user; + const data = {}; - // untested but probably will work - DeleteGuild(guild) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.GUILD(guild.id), true) - .then(() => { - resolve(this.rest.client.actions.GuildDelete.handle({ id:guild.id }).guild); - }) - .catch(reject); - }); - } + data.username = _data.username || user.username; + data.avatar = this.rest.client.resolver.resolveBase64(_data.avatar) || user.avatar; + if (!user.bot) { + data.password = this.rest.client.store.password; + data.email = _data.email || this.rest.client.store.email; + data.new_password = _data.newPassword; + } - UpdateCurrentUser(_data) { - return new Promise((resolve, reject) => { - let user = this.rest.client.store.user; - let data = {}; + this.rest.makeRequest('patch', Constants.Endpoints.me, true, data) + .then(newData => resolve(this.rest.client.actions.UserUpdate.handle(newData).updated)) + .catch(reject); + }); + } - data.username = _data.username || user.username; - data.avatar = this.rest.client.resolver.ResolveBase64(_data.avatar) || user.avatar; - if (!user.bot) { - data.password = this.rest.client.store.password; - data.email = _data.email || this.rest.client.store.email; - data.new_password = _data.newPassword; - } + updateGuild(guild, _data) { + return new Promise((resolve, reject) => { + /* + can contain: + name, region, verificationLevel, afkChannel, afkTimeout, icon, owner, splash + */ - this.rest.makeRequest('patch', Constants.Endpoints.ME, true, data) - .then(data => resolve(this.rest.client.actions.UserUpdate.handle(data).updated)) - .catch(reject); - }); - } + const data = {}; - UpdateGuild(guild, _data) { - return new Promise((resolve, reject) => { - /* - can contain: - name, region, verificationLevel, afkChannel, afkTimeout, icon, owner, splash - */ + if (_data.name) { + data.name = _data.name; + } - let data = {}; + if (_data.region) { + data.region = _data.region; + } - if (_data.name) { - data.name = _data.name; - } + if (_data.verificationLevel) { + data.verification_level = Number(_data.verificationLevel); + } - if (_data.region) { - data.region = _data.region; - } + if (_data.afkChannel) { + data.afk_channel_id = this.rest.client.resolver.resolveChannel(_data.afkChannel).id; + } - if (_data.verificationLevel) { - data.verification_level = Number(_data.verificationLevel); - } + if (_data.afkTimeout) { + data.afk_timeout = Number(_data.afkTimeout); + } - if (_data.afkChannel) { - data.afk_channel_id = this.rest.client.resolver.ResolveChannel(_data.afkChannel).id; - } + if (_data.icon) { + data.icon = this.rest.client.resolver.resolveBase64(_data.icon); + } - if (_data.afkTimeout) { - data.afk_timeout = Number(_data.afkTimeout); - } + if (_data.owner) { + data.owner_id = this.rest.client.resolver.resolveUser(_data.owner).id; + } - if (_data.icon) { - data.icon = this.rest.client.resolver.ResolveBase64(_data.icon); - } + if (_data.splash) { + data.splash = this.rest.client.resolver.resolveBase64(_data.splash); + } - if (_data.owner) { - data.owner_id = this.rest.client.resolver.ResolveUser(_data.owner).id; - } + this.rest.makeRequest('patch', Constants.Endpoints.guild(guild.id), true, data) + .then(newData => resolve(this.rest.client.actions.GuildUpdate.handle(newData).updated)) + .catch(reject); + }); + } - if (_data.splash) { - data.splash = this.rest.client.resolver.ResolveBase64(_data.splash); - } + kickGuildMember(guild, member) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.guildMember(guild.id, member.id), true) + .then(() => { + resolve(this.rest.client.actions.GuildMemberRemove.handle({ + guild_id: guild.id, + user: member.user, + }).m); + }) + .catch(reject); + }); + } - this.rest.makeRequest('patch', Constants.Endpoints.GUILD(guild.id), true, data) - .then(data => resolve(this.rest.client.actions.GuildUpdate.handle(data).updated)) - .catch(reject); - }); - } + createGuildRole(guild) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('post', Constants.Endpoints.guildRoles(guild.id), true) + .then(role => { + resolve(this.rest.client.actions.GuildRoleCreate.handle({ + guild_id: guild.id, + role, + }).role); + }) + .catch(reject); + }); + } - KickGuildMember(guild, member) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.GUILD_MEMBER(guild.id, member.id), true) - .then(() => { - resolve(this.rest.client.actions.GuildMemberRemove.handle({ - guild_id: guild.id, - user: member.user, - }).m); - }) - .catch(reject); - }); - } + deleteGuildRole(role) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.guildRole(role.guild.id, role.id), true) + .then(() => { + resolve(this.rest.client.actions.GuildRoleDelete.handle({ + guild_id: role.guild.id, + role_id: role.id, + }).role); + }) + .catch(reject); + }); + } - CreateGuildRole(guild) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('post', Constants.Endpoints.GUILD_ROLES(guild.id), true) - .then(role => { - resolve(this.rest.client.actions.GuildRoleCreate.handle({ - guild_id: guild.id, - role, - }).role); - }) - .catch(reject); - }); - } + updateGuildRole(role, _data) { + return new Promise((resolve, reject) => { + /* + can contain: + name, position, permissions, color, hoist + */ - DeleteGuildRole(role) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.GUILD_ROLE(role.guild.id, role.id), true) - .then(() => { - resolve(this.rest.client.actions.GuildRoleDelete.handle({ - guild_id: role.guild.id, - role_id: role.id, - }).role); - }) - .catch(reject); - }); - } + const data = {}; - UpdateGuildRole(role, _data) { - return new Promise((resolve, reject) => { - /* - can contain: - name, position, permissions, color, hoist - */ + data.name = _data.name || role.name; + data.position = _data.position || role.position; + data.color = _data.color || role.color; - let data = {}; + if (typeof _data.hoist !== 'undefined') { + data.hoist = _data.hoist; + } else { + data.hoist = role.hoist; + } - data.name = _data.name || role.name; - data.position = _data.position || role.position; - data.color = _data.color || role.color; + if (_data.permissions) { + let perms = 0; + for (let perm of _data.permissions) { + if (perm instanceof String || typeof perm === 'string') { + perm = Constants.PermissionFlags[perm]; + } + perms |= perm; + } + data.permissions = perms; + } else { + data.permissions = role.permissions; + } - if (typeof _data.hoist !== 'undefined') { - data.hoist = _data.hoist; - } else { - data.hoist = role.hoist; - } - - if (_data.permissions) { - let perms = 0; - for (let perm of _data.permissions) { - if (perm instanceof String || typeof perm === 'string') { - perm = Constants.PermissionFlags[perm]; - } - perms |= perm; - } - data.permissions = perms; - } else { - data.permissions = role.permissions; - } - console.log(data); - this.rest.makeRequest('patch', Constants.Endpoints.GUILD_ROLE(role.guild.id, role.id), true, data) - .then(_role => { - resolve(this.rest.client.actions.GuildRoleUpdate.handle({ - role: _role, - guild_id: role.guild.id, - }).updated); - }) - .catch(reject); - }); - } + this.rest.makeRequest('patch', Constants.Endpoints.guildRole(role.guild.id, role.id), true, data) + .then(_role => { + resolve(this.rest.client.actions.GuildRoleUpdate.handle({ + role: _role, + guild_id: role.guild.id, + }).updated); + }) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/client/rest/UserAgentManager.js b/src/client/rest/UserAgentManager.js index 9fb075fca..12393ffd1 100644 --- a/src/client/rest/UserAgentManager.js +++ b/src/client/rest/UserAgentManager.js @@ -1,24 +1,22 @@ -'use strict'; - const Constants = require('../../util/Constants'); -class UserAgentManager{ - constructor(restManager) { - this.restManager = restManager; - this._userAgent = { - url: 'https://github.com/hydrabolt/discord.js', - version: Constants.Package.version, - }; - } +class UserAgentManager { + constructor(restManager) { + this.restManager = restManager; + this._userAgent = { + url: 'https://github.com/hydrabolt/discord.js', + version: Constants.Package.version, + }; + } - set(info) { - this._userAgent.url = info.url || 'https://github.com/hydrabolt/discord.js'; - this._userAgent.version = info.version || Constants.Package.version; - } + set(info) { + this._userAgent.url = info.url || 'https://github.com/hydrabolt/discord.js'; + this._userAgent.version = info.version || Constants.Package.version; + } - get userAgent() { - return `DiscordBot (${this._userAgent.url}, ${this._userAgent.version})`; - } + get userAgent() { + return `DiscordBot (${this._userAgent.url}, ${this._userAgent.version})`; + } } module.exports = UserAgentManager; diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index a3d7f08ca..0b30d627d 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -1,5 +1,3 @@ -'use strict'; - const WebSocket = require('ws'); const Constants = require('../../util/Constants'); const zlib = require('zlib'); @@ -8,111 +6,111 @@ const WebSocketManagerDataStore = require('../../structures/datastore/WebSocketM class WebSocketManager { - constructor(client) { - this.client = client; - this.ws = null; - this.packetManager = new PacketManager(this); - this.store = new WebSocketManagerDataStore(); - this.status = Constants.Status.IDLE; - } + constructor(client) { + this.client = client; + this.ws = null; + this.packetManager = new PacketManager(this); + this.store = new WebSocketManagerDataStore(); + this.status = Constants.Status.IDLE; + } - connect(gateway) { - this.status = Constants.Status.CONNECTING; - this.store.gateway = gateway; - gateway += `/?v=${this.client.options.protocol_version}`; - this.ws = new WebSocket(gateway); - this.ws.onopen = () => this.EventOpen(); - this.ws.onclose = () => this.EventClose(); - this.ws.onmessage = (e) => this.EventMessage(e); - this.ws.onerror = (e) => this.EventError(e); - } + connect(gateway) { + this.status = Constants.Status.CONNECTING; + this.store.gateway = `${gateway}/?v=${this.client.options.protocol_version}`; + this.ws = new WebSocket(gateway); + this.ws.onopen = () => this.eventOpen(); + this.ws.onclose = () => this.eventClose(); + this.ws.onmessage = (e) => this.eventMessage(e); + this.ws.onerror = (e) => this.eventError(e); + } - send(data) { - if (this.ws.readyState === WebSocket.OPEN) { - this.ws.send(JSON.stringify(data)); - } - } + send(data) { + if (this.ws.readyState === WebSocket.OPEN) { + this.ws.send(JSON.stringify(data)); + } + } - EventOpen() { - if (this.reconnecting) { - this._sendResume(); - } else { - this._sendNewIdentify(); - } - } + eventOpen() { + if (this.reconnecting) { + this._sendResume(); + } else { + this._sendNewIdentify(); + } + } - _sendResume() { - let payload = { - token: this.client.store.token, - session_id: this.store.sessionID, - seq: this.store.sequence, - }; + _sendResume() { + const payload = { + token: this.client.store.token, + session_id: this.store.sessionID, + seq: this.store.sequence, + }; - this.send({ - op: Constants.OPCodes.RESUME, - d: payload, - }); - } + this.send({ + op: Constants.OPCodes.RESUME, + d: payload, + }); + } - _sendNewIdentify() { - this.reconnecting = false; - let payload = this.client.options.ws; - payload.token = this.client.store.token; + _sendNewIdentify() { + this.reconnecting = false; + const payload = this.client.options.ws; + payload.token = this.client.store.token; - this.send({ - op: Constants.OPCodes.IDENTIFY, - d: payload, - }); - } + this.send({ + op: Constants.OPCodes.IDENTIFY, + d: payload, + }); + } - EventClose() { - if (!this.reconnecting) { - this.tryReconnect(); - } - } + eventClose() { + if (!this.reconnecting) { + this.tryReconnect(); + } + } - EventMessage(event) { - let packet; - try { - if (event.binary) { - event.data = zlib.inflateSync(event.data).toString(); - } + eventMessage($event) { + let packet; + const event = $event; + try { + if (event.binary) { + event.data = zlib.inflateSync(event.data).toString(); + } - packet = JSON.parse(event.data); - } catch (e) { - return this.EventError(Constants.Errors.BAD_WS_MESSAGE); - } + packet = JSON.parse(event.data); + } catch (e) { + return this.eventError(Constants.Errors.BAD_WS_MESSAGE); + } - this.packetManager.handle(packet); - } + return this.packetManager.handle(packet); + } - EventError(e) { - this.tryReconnect(); - } + EventError() { + this.tryReconnect(); + } - checkIfReady() { - if (this.status !== Constants.Status.READY) { - let unavailableCount = 0; + checkIfReady() { + if (this.status !== Constants.Status.READY) { + let unavailableCount = 0; - for (let guildID in this.client.store.data.guilds) { - unavailableCount += this.client.store.data.guilds[guildID].available ? 0 : 1; - } + for (const guildID in this.client.store.data.guilds) { + unavailableCount += this.client.store.data.guilds[guildID].available ? 0 : 1; + } - if (unavailableCount === 0) { - this.status = Constants.Status.READY; - this.client.emit(Constants.Events.READY); - this.packetManager.handleQueue(); - } - } - } + if (unavailableCount === 0) { + this.status = Constants.Status.READY; + this.client.emit(Constants.Events.READY); + this.packetManager.handleQueue(); + } + } + } - tryReconnect() { - this.status = Constants.Status.RECONNECTING; - this.ws.close(); - this.packetManager.handleQueue(); - this.client.emit(Constants.Events.RECONNECTING); - this.connect(this.store.gateway); - } + tryReconnect() { + this.status = Constants.Status.RECONNECTING; + this.ws.close(); + this.packetManager.handleQueue(); + this.client.emit(Constants.Events.RECONNECTING); + this.connect(this.store.gateway); + } } module.exports = WebSocketManager; diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index b4e123033..dd8615637 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -1,100 +1,97 @@ -'use strict'; - const Constants = require('../../../util/Constants'); const BeforeReadyWhitelist = [ - Constants.WSEvents.READY, - Constants.WSEvents.GUILD_CREATE, - Constants.WSEvents.GUILD_DELETE, + Constants.WSEvents.READY, + Constants.WSEvents.GUILD_CREATE, + Constants.WSEvents.GUILD_DELETE, ]; class WebSocketPacketManager { - constructor(websocketManager) { - this.ws = websocketManager; - this.handlers = {}; - this.queue = []; + constructor(websocketManager) { + this.ws = websocketManager; + this.handlers = {}; + this.queue = []; - this.register(Constants.WSEvents.READY, 'Ready'); - this.register(Constants.WSEvents.GUILD_CREATE, 'GuildCreate'); - this.register(Constants.WSEvents.GUILD_DELETE, 'GuildDelete'); - this.register(Constants.WSEvents.GUILD_UPDATE, 'GuildUpdate'); - this.register(Constants.WSEvents.GUILD_BAN_ADD, 'GuildBanAdd'); - this.register(Constants.WSEvents.GUILD_BAN_REMOVE, 'GuildBanRemove'); - this.register(Constants.WSEvents.GUILD_MEMBER_ADD, 'GuildMemberAdd'); - this.register(Constants.WSEvents.GUILD_MEMBER_REMOVE, 'GuildMemberRemove'); - this.register(Constants.WSEvents.GUILD_MEMBER_UPDATE, 'GuildMemberUpdate'); - this.register(Constants.WSEvents.GUILD_ROLE_CREATE, 'GuildRoleCreate'); - this.register(Constants.WSEvents.GUILD_ROLE_DELETE, 'GuildRoleDelete'); - this.register(Constants.WSEvents.GUILD_ROLE_UPDATE, 'GuildRoleUpdate'); - this.register(Constants.WSEvents.GUILD_MEMBERS_CHUNK, 'GuildMembersChunk'); - this.register(Constants.WSEvents.CHANNEL_CREATE, 'ChannelCreate'); - this.register(Constants.WSEvents.CHANNEL_DELETE, 'ChannelDelete'); - this.register(Constants.WSEvents.CHANNEL_UPDATE, 'ChannelUpdate'); - this.register(Constants.WSEvents.PRESENCE_UPDATE, 'PresenceUpdate'); - this.register(Constants.WSEvents.USER_UPDATE, 'UserUpdate'); - this.register(Constants.WSEvents.VOICE_STATE_UPDATE, 'VoiceStateUpdate'); - this.register(Constants.WSEvents.TYPING_START, 'TypingStart'); - this.register(Constants.WSEvents.MESSAGE_CREATE, 'MessageCreate'); - this.register(Constants.WSEvents.MESSAGE_DELETE, 'MessageDelete'); - this.register(Constants.WSEvents.MESSAGE_UPDATE, 'MessageUpdate'); - } + this.register(Constants.WSEvents.READY, 'Ready'); + this.register(Constants.WSEvents.GUILD_CREATE, 'GuildCreate'); + this.register(Constants.WSEvents.GUILD_DELETE, 'GuildDelete'); + this.register(Constants.WSEvents.GUILD_UPDATE, 'GuildUpdate'); + this.register(Constants.WSEvents.GUILD_BAN_ADD, 'GuildBanAdd'); + this.register(Constants.WSEvents.GUILD_BAN_REMOVE, 'GuildBanRemove'); + this.register(Constants.WSEvents.GUILD_MEMBER_ADD, 'GuildMemberAdd'); + this.register(Constants.WSEvents.GUILD_MEMBER_REMOVE, 'GuildMemberRemove'); + this.register(Constants.WSEvents.GUILD_MEMBER_UPDATE, 'GuildMemberUpdate'); + this.register(Constants.WSEvents.GUILD_ROLE_CREATE, 'GuildRoleCreate'); + this.register(Constants.WSEvents.GUILD_ROLE_DELETE, 'GuildRoleDelete'); + this.register(Constants.WSEvents.GUILD_ROLE_UPDATE, 'GuildRoleUpdate'); + this.register(Constants.WSEvents.GUILD_MEMBERS_CHUNK, 'GuildMembersChunk'); + this.register(Constants.WSEvents.CHANNEL_CREATE, 'ChannelCreate'); + this.register(Constants.WSEvents.CHANNEL_DELETE, 'ChannelDelete'); + this.register(Constants.WSEvents.CHANNEL_UPDATE, 'ChannelUpdate'); + this.register(Constants.WSEvents.PRESENCE_UPDATE, 'PresenceUpdate'); + this.register(Constants.WSEvents.USER_UPDATE, 'UserUpdate'); + this.register(Constants.WSEvents.VOICE_STATE_UPDATE, 'VoiceStateUpdate'); + this.register(Constants.WSEvents.TYPING_START, 'TypingStart'); + this.register(Constants.WSEvents.MESSAGE_CREATE, 'MessageCreate'); + this.register(Constants.WSEvents.MESSAGE_DELETE, 'MessageDelete'); + this.register(Constants.WSEvents.MESSAGE_UPDATE, 'MessageUpdate'); + } - get client() { - return this.ws.client; - } + get client() { + return this.ws.client; + } - register(event, handle) { - let Handler = require(`./handlers/${handle}`); - this.handlers[event] = new Handler(this); - } + register(event, handle) { + const Handler = require(`./handlers/${handle}`); + this.handlers[event] = new Handler(this); + } - handleQueue() { - for (let packetIndex in this.queue) { - this.handle(this.queue[packetIndex]); - this.queue.splice(packetIndex, 1); - } - } + handleQueue() { + this.queue.forEach((element, index) => { + this.handle(this.queue[index]); + this.queue.splice(index, 1); + }); + } - setSequence(s) { - if (s && s > this.ws.store.sequence) { - this.ws.store.sequence = s; - } - } + setSequence(s) { + if (s && s > this.ws.store.sequence) { + this.ws.store.sequence = s; + } + } - handle(packet) { + handle(packet) { + if (packet.op === Constants.OPCodes.RECONNECT) { + this.setSequence(packet.s); + this.ws.tryReconnect(); + return false; + } - if (packet.op === Constants.OPCodes.RECONNECT) { - this.setSequence(packet.s); - this.ws.tryReconnect(); - return; - } + if (packet.op === Constants.OPCodes.INVALID_SESSION) { + this.ws._sendNewIdentify(); + return false; + } - if (packet.op === Constants.OPCodes.INVALID_SESSION) { - this.ws._sendNewIdentify(); - return; - } + if (this.ws.reconnecting) { + this.ws.reconnecting = false; + this.ws.checkIfReady(); + } - if (this.ws.reconnecting) { - this.ws.reconnecting = false; - this.ws.checkIfReady(); - } + this.setSequence(packet.s); - this.setSequence(packet.s); + if (this.ws.status !== Constants.Status.READY) { + if (BeforeReadyWhitelist.indexOf(packet.t) === -1) { + this.queue.push(packet); + return false; + } + } - if (this.ws.status !== Constants.Status.READY) { - if (BeforeReadyWhitelist.indexOf(packet.t) === -1) { - this.queue.push(packet); - return; - } - } + if (this.handlers[packet.t]) { + return this.handlers[packet.t].handle(packet); + } - if (this.handlers[packet.t]) { - return this.handlers[packet.t].handle(packet); - } - - return false; - } + return false; + } } diff --git a/src/client/websocket/packets/handlers/AbstractHandler.js b/src/client/websocket/packets/handlers/AbstractHandler.js index 9ab096dd6..ec744c487 100644 --- a/src/client/websocket/packets/handlers/AbstractHandler.js +++ b/src/client/websocket/packets/handlers/AbstractHandler.js @@ -1,14 +1,12 @@ -'use strict'; - class AbstractHandler { - constructor(packetManager) { - this.packetManager = packetManager; - } + constructor(packetManager) { + this.packetManager = packetManager; + } - handle(packet) { - - } + handle(packet) { + return packet; + } } module.exports = AbstractHandler; diff --git a/src/client/websocket/packets/handlers/ChannelCreate.js b/src/client/websocket/packets/handlers/ChannelCreate.js index 100b02785..bf81ee6ce 100644 --- a/src/client/websocket/packets/handlers/ChannelCreate.js +++ b/src/client/websocket/packets/handlers/ChannelCreate.js @@ -1,32 +1,20 @@ -'use strict'; - const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); - -const ClientUser = Structure('ClientUser'); -const Guild = Structure('Guild'); -const DMChannel = Structure('DMChannel'); const Constants = require('../../../../util/Constants'); class ChannelCreateHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + const response = client.actions.ChannelCreate.handle(data); - let response = client.actions.ChannelCreate.handle(data); + if (response.channel) { + client.emit(Constants.Events.CHANNEL_CREATE, response.channel); + } + } - if (response.channel) { - client.emit(Constants.Events.CHANNEL_CREATE, response.channel); - } - - } - -}; +} module.exports = ChannelCreateHandler; diff --git a/src/client/websocket/packets/handlers/ChannelDelete.js b/src/client/websocket/packets/handlers/ChannelDelete.js index 82a6eed6f..fc47f1858 100644 --- a/src/client/websocket/packets/handlers/ChannelDelete.js +++ b/src/client/websocket/packets/handlers/ChannelDelete.js @@ -1,31 +1,20 @@ -'use strict'; - const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); - -const ClientUser = Structure('ClientUser'); -const Guild = Structure('Guild'); -const ServerChannel = Structure('ServerChannel'); const Constants = require('../../../../util/Constants'); class ChannelDeleteHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + const response = client.actions.ChannelDelete.handle(data); - let response = client.actions.ChannelDelete.handle(data); + if (response.channel) { + client.emit(Constants.Events.CHANNEL_DELETE, response.channel); + } + } - if (response.channel) { - client.emit(Constants.Events.CHANNEL_DELETE, response.channel); - } - } - -}; +} module.exports = ChannelDeleteHandler; diff --git a/src/client/websocket/packets/handlers/ChannelUpdate.js b/src/client/websocket/packets/handlers/ChannelUpdate.js index 41491a103..070cdcd24 100644 --- a/src/client/websocket/packets/handlers/ChannelUpdate.js +++ b/src/client/websocket/packets/handlers/ChannelUpdate.js @@ -1,28 +1,14 @@ -'use strict'; - -const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); - -const ClientUser = Structure('ClientUser'); -const Guild = Structure('Guild'); -const ServerChannel = Structure('ServerChannel'); - -const Constants = require('../../../../util/Constants'); -const CloneObject = require('../../../../util/CloneObject'); - -class ChannelUpdateHandler extends AbstractHandler { - - constructor(packetManager) { - super(packetManager); - } - - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; - - client.actions.ChannelUpdate.handle(data); - } - -}; - -module.exports = ChannelUpdateHandler; +const AbstractHandler = require('./AbstractHandler'); + +class ChannelUpdateHandler extends AbstractHandler { + + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; + + client.actions.ChannelUpdate.handle(data); + } + +} + +module.exports = ChannelUpdateHandler; diff --git a/src/client/websocket/packets/handlers/GuildBanAdd.js b/src/client/websocket/packets/handlers/GuildBanAdd.js index 7294b2fca..11b336961 100644 --- a/src/client/websocket/packets/handlers/GuildBanAdd.js +++ b/src/client/websocket/packets/handlers/GuildBanAdd.js @@ -1,33 +1,22 @@ -'use strict'; - // ##untested handler## const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); - -const ClientUser = Structure('ClientUser'); -const Guild = Structure('Guild'); - const Constants = require('../../../../util/Constants'); class GuildBanAddHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + const guild = client.store.get('guilds', data.guild_id); + const user = client.store.get('users', data.user.id); - let guild = client.store.get('guilds', data.guild_id); - let user = client.store.get('users', data.user.id); + if (guild && user) { + client.emit(Constants.Events.GUILD_BAN_ADD, guild, user); + } + } - if (guild && user) { - client.emit(Constants.Events.GUILD_BAN_ADD, guild, user); - } - } - -}; +} module.exports = GuildBanAddHandler; diff --git a/src/client/websocket/packets/handlers/GuildBanRemove.js b/src/client/websocket/packets/handlers/GuildBanRemove.js index ec792f1bf..1a41f777a 100644 --- a/src/client/websocket/packets/handlers/GuildBanRemove.js +++ b/src/client/websocket/packets/handlers/GuildBanRemove.js @@ -1,33 +1,23 @@ -'use strict'; - // ##untested handler## const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); - -const ClientUser = Structure('ClientUser'); -const Guild = Structure('Guild'); const Constants = require('../../../../util/Constants'); class GuildBanRemoveHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + const guild = client.store.get('guilds', data.guild_id); + const user = client.store.get('users', data.user.id); - let guild = client.store.get('guilds', data.guild_id); - let user = client.store.get('users', data.user.id); + if (guild && user) { + client.emit(Constants.Events.GUILD_BAN_REMOVE, guild, user); + } + } - if (guild && user) { - client.emit(Constants.Events.GUILD_BAN_REMOVE, guild, user); - } - } - -}; +} module.exports = GuildBanRemoveHandler; diff --git a/src/client/websocket/packets/handlers/GuildCreate.js b/src/client/websocket/packets/handlers/GuildCreate.js index 96777a79d..f39b21302 100644 --- a/src/client/websocket/packets/handlers/GuildCreate.js +++ b/src/client/websocket/packets/handlers/GuildCreate.js @@ -1,38 +1,25 @@ -'use strict'; - const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); - -const ClientUser = Structure('ClientUser'); -const Guild = Structure('Guild'); - -const Constants = require('../../../../util/Constants'); class GuildCreateHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + const guild = client.store.get('guilds', data.id); - let guild = client.store.get('guilds', data.id); + if (guild) { + if (!guild.available && !data.unavailable) { + // a newly available guild + guild.setup(data); + this.packetManager.ws.checkIfReady(); + } + } else { + // a new guild + client.store.newGuild(data); + } + } - if (guild) { - if (!guild.available && !data.unavailable) { - // a newly available guild - guild.setup(data); - this.packetManager.ws.checkIfReady(); - } - } else { - // a new guild - client.store.NewGuild(data); - } - - } - -}; +} module.exports = GuildCreateHandler; diff --git a/src/client/websocket/packets/handlers/GuildDelete.js b/src/client/websocket/packets/handlers/GuildDelete.js index 05319a5cb..a86dbd2db 100644 --- a/src/client/websocket/packets/handlers/GuildDelete.js +++ b/src/client/websocket/packets/handlers/GuildDelete.js @@ -1,31 +1,19 @@ -'use strict'; - const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); - -const ClientUser = Structure('ClientUser'); -const Guild = Structure('Guild'); - const Constants = require('../../../../util/Constants'); class GuildDeleteHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + const response = client.actions.GuildDelete.handle(data); - let response = client.actions.GuildDelete.handle(data); + if (response.guild) { + client.emit(Constants.Events.GUILD_DELETE, response.guild); + } + } - if (response.guild) { - client.emit(Constants.Events.GUILD_DELETE, response.guild); - } - - } - -}; +} module.exports = GuildDeleteHandler; diff --git a/src/client/websocket/packets/handlers/GuildMemberAdd.js b/src/client/websocket/packets/handlers/GuildMemberAdd.js index 23a475f96..8f9101fb8 100644 --- a/src/client/websocket/packets/handlers/GuildMemberAdd.js +++ b/src/client/websocket/packets/handlers/GuildMemberAdd.js @@ -1,32 +1,20 @@ -'use strict'; - // ##untested handler## const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); - -const ClientUser = Structure('ClientUser'); -const Guild = Structure('Guild'); - -const Constants = require('../../../../util/Constants'); class GuildMemberAddHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + const guild = client.store.get('guilds', data.guild_id); - let guild = client.store.get('guilds', data.guild_id); + if (guild) { + guild._addMember(data); + } + } - if (guild) { - guild._addMember(data); - } - } - -}; +} module.exports = GuildMemberAddHandler; diff --git a/src/client/websocket/packets/handlers/GuildMemberRemove.js b/src/client/websocket/packets/handlers/GuildMemberRemove.js index cf61c816b..2f8571e58 100644 --- a/src/client/websocket/packets/handlers/GuildMemberRemove.js +++ b/src/client/websocket/packets/handlers/GuildMemberRemove.js @@ -1,28 +1,16 @@ -'use strict'; - // ##untested handler## const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); - -const ClientUser = Structure('ClientUser'); -const Guild = Structure('Guild'); - -const Constants = require('../../../../util/Constants'); class GuildMemberRemoveHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + client.actions.GuildMemberRemove.handle(data); + } - let response = client.actions.GuildMemberRemove.handle(data); - } - -}; +} module.exports = GuildMemberRemoveHandler; diff --git a/src/client/websocket/packets/handlers/GuildMemberUpdate.js b/src/client/websocket/packets/handlers/GuildMemberUpdate.js index 20455a216..d5f6f7145 100644 --- a/src/client/websocket/packets/handlers/GuildMemberUpdate.js +++ b/src/client/websocket/packets/handlers/GuildMemberUpdate.js @@ -1,35 +1,23 @@ -'use strict'; - // ##untested handler## const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); - -const ClientUser = Structure('ClientUser'); -const Guild = Structure('Guild'); - -const Constants = require('../../../../util/Constants'); class GuildMemberUpdateHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + const guild = client.store.get('guilds', data.guild_id); - let guild = client.store.get('guilds', data.guild_id); + if (guild) { + const member = guild.store.get('members', data.user.id); + if (member) { + guild._updateMember(member, data); + } + } + } - if (guild) { - let member = guild.store.get('members', data.user.id); - if (member) { - guild._updateMember(member, data); - } - } - } - -}; +} module.exports = GuildMemberUpdateHandler; diff --git a/src/client/websocket/packets/handlers/GuildMembersChunk.js b/src/client/websocket/packets/handlers/GuildMembersChunk.js index 3cd2ba516..5949580dd 100644 --- a/src/client/websocket/packets/handlers/GuildMembersChunk.js +++ b/src/client/websocket/packets/handlers/GuildMembersChunk.js @@ -1,33 +1,25 @@ -'use strict'; - // ##untested## const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); const Constants = require('../../../../util/Constants'); -const CloneObject = require('../../../../util/CloneObject'); class GuildMembersChunkHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; + const guild = client.store.get('guilds', data.guild_id); - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; - let guild = client.store.get('guilds', data.guild_id); + const members = []; + if (guild) { + for (const member of guild.members) { + members.push(guild._addMember(member, true)); + } + } - let members = []; - if (guild) { - for (let member of guild.members) { - members.push(guild._addMember(member, true)); - } - } + client.emit(Constants.Events.GUILD_MEMBERS_CHUNK, guild, members); + } - client.emit(Constants.Events.GUILD_MEMBERS_CHUNK, guild, members); - } - -}; +} module.exports = GuildMembersChunkHandler; diff --git a/src/client/websocket/packets/handlers/GuildRoleCreate.js b/src/client/websocket/packets/handlers/GuildRoleCreate.js index c2ffdbb43..6b791bfb3 100644 --- a/src/client/websocket/packets/handlers/GuildRoleCreate.js +++ b/src/client/websocket/packets/handlers/GuildRoleCreate.js @@ -1,25 +1,14 @@ -'use strict'; - const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); -const Constants = require('../../../../util/Constants'); - -const Role = Structure('Role'); -const Guild = Structure('Guild'); class GuildRoleCreateHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + client.actions.GuildRoleCreate.handle(data); + } - let response = client.actions.GuildRoleCreate.handle(data); - } - -}; +} module.exports = GuildRoleCreateHandler; diff --git a/src/client/websocket/packets/handlers/GuildRoleDelete.js b/src/client/websocket/packets/handlers/GuildRoleDelete.js index 2214a7982..17135e20a 100644 --- a/src/client/websocket/packets/handlers/GuildRoleDelete.js +++ b/src/client/websocket/packets/handlers/GuildRoleDelete.js @@ -1,25 +1,14 @@ -'use strict'; - -const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); -const Constants = require('../../../../util/Constants'); - -const Role = Structure('Role'); -const Guild = Structure('Guild'); - -class GuildRoleDeleteHandler extends AbstractHandler { - - constructor(packetManager) { - super(packetManager); - } - - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; - - let response = client.actions.GuildRoleDelete.handle(data); - } - -}; - -module.exports = GuildRoleDeleteHandler; +const AbstractHandler = require('./AbstractHandler'); + +class GuildRoleDeleteHandler extends AbstractHandler { + + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; + + client.actions.GuildRoleDelete.handle(data); + } + +} + +module.exports = GuildRoleDeleteHandler; diff --git a/src/client/websocket/packets/handlers/GuildRoleUpdate.js b/src/client/websocket/packets/handlers/GuildRoleUpdate.js index 98005bc02..8fea7271f 100644 --- a/src/client/websocket/packets/handlers/GuildRoleUpdate.js +++ b/src/client/websocket/packets/handlers/GuildRoleUpdate.js @@ -1,26 +1,14 @@ -'use strict'; - const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); -const Constants = require('../../../../util/Constants'); -const CloneObject = require('../../../../util/CloneObject'); - -const Role = Structure('Role'); -const Guild = Structure('Guild'); class GuildRoleUpdateHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + client.actions.GuildRoleUpdate.handle(data); + } - let response = client.actions.GuildRoleUpdate.handle(data); - } - -}; +} module.exports = GuildRoleUpdateHandler; diff --git a/src/client/websocket/packets/handlers/GuildUpdate.js b/src/client/websocket/packets/handlers/GuildUpdate.js index 7a44eaabc..b022fb688 100644 --- a/src/client/websocket/packets/handlers/GuildUpdate.js +++ b/src/client/websocket/packets/handlers/GuildUpdate.js @@ -1,28 +1,14 @@ -'use strict'; - const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); - -const ClientUser = Structure('ClientUser'); -const Guild = Structure('Guild'); - -const Constants = require('../../../../util/Constants'); -const CloneObject = require('../../../../util/CloneObject'); class GuildUpdateHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + client.actions.GuildUpdate.handle(data); + } - let response = client.actions.GuildUpdate.handle(data); - - } - -}; +} module.exports = GuildUpdateHandler; diff --git a/src/client/websocket/packets/handlers/MessageCreate.js b/src/client/websocket/packets/handlers/MessageCreate.js index 76241e37e..fcbd8028c 100644 --- a/src/client/websocket/packets/handlers/MessageCreate.js +++ b/src/client/websocket/packets/handlers/MessageCreate.js @@ -1,29 +1,19 @@ -'use strict'; - const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); const Constants = require('../../../../util/Constants'); -const Message = Structure('Message'); -const Guild = Structure('Guild'); - class MessageCreateHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + const response = client.actions.MessageCreate.handle(data); - let response = client.actions.MessageCreate.handle(data); + if (response.m) { + client.emit(Constants.Events.MESSAGE_CREATE, response.m); + } + } - if (response.m) { - client.emit(Constants.Events.MESSAGE_CREATE, response.m); - } - } - -}; +} module.exports = MessageCreateHandler; diff --git a/src/client/websocket/packets/handlers/MessageDelete.js b/src/client/websocket/packets/handlers/MessageDelete.js index c3457f920..e29b149d4 100644 --- a/src/client/websocket/packets/handlers/MessageDelete.js +++ b/src/client/websocket/packets/handlers/MessageDelete.js @@ -1,29 +1,19 @@ -'use strict'; - const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); const Constants = require('../../../../util/Constants'); -const Message = Structure('Message'); -const Guild = Structure('Guild'); - class MessageDeleteHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + const response = client.actions.MessageDelete.handle(data); - let response = client.actions.MessageDelete.handle(data); + if (response.m) { + client.emit(Constants.Events.MESSAGE_DELETE, response.m); + } + } - if (response.m) { - client.emit(Constants.Events.MESSAGE_DELETE, response.m); - } - } - -}; +} module.exports = MessageDeleteHandler; diff --git a/src/client/websocket/packets/handlers/MessageUpdate.js b/src/client/websocket/packets/handlers/MessageUpdate.js index 69ac2aa3a..56b8992b4 100644 --- a/src/client/websocket/packets/handlers/MessageUpdate.js +++ b/src/client/websocket/packets/handlers/MessageUpdate.js @@ -1,27 +1,14 @@ -'use strict'; - const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); -const Constants = require('../../../../util/Constants'); -const CloneObject = require('../../../../util/CloneObject'); - -const Message = Structure('Message'); -const Guild = Structure('Guild'); class MessageUpdateHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + client.actions.MessageUpdate.handle(data); + } - let response = client.actions.MessageUpdate.handle(data); - - } - -}; +} module.exports = MessageUpdateHandler; diff --git a/src/client/websocket/packets/handlers/PresenceUpdate.js b/src/client/websocket/packets/handlers/PresenceUpdate.js index e3c5e4f1a..51732c726 100644 --- a/src/client/websocket/packets/handlers/PresenceUpdate.js +++ b/src/client/websocket/packets/handlers/PresenceUpdate.js @@ -1,75 +1,66 @@ -'use strict'; - const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); const Constants = require('../../../../util/Constants'); -const CloneObject = require('../../../../util/CloneObject'); - -const Role = Structure('User'); +const cloneObject = require('../../../../util/CloneObject'); class PresenceUpdateHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; + let user = client.store.get('users', data.user.id); + const guild = client.store.get('guilds', data.guild_id); - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; - let user = client.store.get('users', data.user.id); - let guild = client.store.get('guilds', data.guild_id); + function makeUser(newUser) { + return client.store.newUser(newUser); + } - function makeUser(user) { - return client.store.NewUser(user); - } + // step 1 + if (!user) { + if (data.user.username) { + user = makeUser(data.user); + } else { + return; + } + } - // step 1 - if (!user) { - if (data.user.username) { - user = makeUser(data.user); - }else { - return; - } - } + if (guild) { + const memberInGuild = guild.store.get('members', user.id); + if (!memberInGuild) { + const member = guild._addMember({ + user, + roles: data.roles, + deaf: false, + mute: false, + }, true); + client.emit(Constants.Events.GUILD_MEMBER_AVAILABLE, guild, member); + } + } - if (guild) { - let memberInGuild = guild.store.get('members', user.id); - if (!memberInGuild) { - let member = guild._addMember({ - user, - roles: data.roles, - deaf: false, - mute: false, - }, true); - client.emit(Constants.Events.GUILD_MEMBER_AVAILABLE, guild, member); - } - } + data.user.username = data.user.username || user.username; + data.user.id = data.user.id || user.id; + data.user.discriminator = data.user.discriminator || user.discriminator; - data.user.username = data.user.username || user.username; - data.user.id = data.user.id || user.id; - data.user.discriminator = data.user.discriminator || user.discriminator; + // comment out avatar patching as it causes bugs (see #297) + // data.user.avatar = data.user.avatar || user.avatar; + data.user.status = data.status || user.status; + data.user.game = data.game; - // comment out avatar patching as it causes bugs (see #297) - // data.user.avatar = data.user.avatar || user.avatar; - data.user.status = data.status || user.status; - data.user.game = data.game; + const same = ( + data.user.username === user.username && + data.user.id === user.id && + data.user.discriminator === user.discriminator && + data.user.avatar === user.avatar && + data.user.status === user.status && + JSON.stringify(data.user.game) === JSON.stringify(user.game) + ); - let same = ( - data.user.username === user.username && - data.user.id === user.id && - data.user.discriminator === user.discriminator && - data.user.avatar === user.avatar && - data.user.status === user.status && - JSON.stringify(data.user.game) === JSON.stringify(user.game) - ); + if (!same) { + const oldUser = cloneObject(user); + user.setup(data.user); + client.emit(Constants.Events.PRESENCE_UPDATE, oldUser, user); + } + } - if (!same) { - let oldUser = CloneObject(user); - user.setup(data.user); - client.emit(Constants.Events.PRESENCE_UPDATE, oldUser, user); - } - } - -}; +} module.exports = PresenceUpdateHandler; diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index ffd4cd0cb..e37d0a758 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -1,39 +1,30 @@ -'use strict'; - const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); -const ClientUser = Structure('ClientUser'); -const Guild = Structure('Guild'); -const DMChannel = Structure('DMChannel'); +const getStructure = name => require(`../../../../structures/${name}`); +const ClientUser = getStructure('ClientUser'); class ReadyHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; + client.manager.setupKeepAlive(data.heartbeat_interval); - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; - client.manager.setupKeepAlive(data.heartbeat_interval); + client.store.user = client.store.add('users', new ClientUser(client, data.user)); - client.store.user = client.store.add('users', new ClientUser(client, data.user)); + for (const guild of data.guilds) { + client.store.newGuild(guild); + } - for (let guild of data.guilds) { - client.store.NewGuild(guild); - } + for (const privateDM of data.private_channels) { + client.store.newChannel(privateDM); + } - for (let privateDM of data.private_channels) { - client.store.NewChannel(privateDM); - } + this.packetManager.ws.store.sessionID = data.session_id; - this.packetManager.ws.store.sessionID = data.session_id; + this.packetManager.ws.checkIfReady(); + } - this.packetManager.ws.checkIfReady(); - - } - -}; +} module.exports = ReadyHandler; diff --git a/src/client/websocket/packets/handlers/TypingStart.js b/src/client/websocket/packets/handlers/TypingStart.js index c64ff705a..421cba9b0 100644 --- a/src/client/websocket/packets/handlers/TypingStart.js +++ b/src/client/websocket/packets/handlers/TypingStart.js @@ -1,60 +1,52 @@ -'use strict'; - const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); const Constants = require('../../../../util/Constants'); -const CloneObject = require('../../../../util/CloneObject'); class TypingData { - constructor(since, lastTimestamp, _timeout) { - this.since = since; - this.lastTimestamp = lastTimestamp; - this._timeout = _timeout; - } + constructor(since, lastTimestamp, _timeout) { + this.since = since; + this.lastTimestamp = lastTimestamp; + this._timeout = _timeout; + } - resetTimeout(_timeout) { - clearTimeout(this._timeout); - this._timeout = _timeout; - } + resetTimeout(_timeout) { + clearTimeout(this._timeout); + this._timeout = _timeout; + } - get elapsedTime() { - return Date.now() - this.since; - } + get elapsedTime() { + return Date.now() - this.since; + } } class TypingStartHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; + const channel = client.store.get('channels', data.channel_id); + const user = client.store.get('users', data.user_id); + const timestamp = new Date(data.timestamp * 1000); - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; - let channel = client.store.get('channels', data.channel_id); - let user = client.store.get('users', data.user_id); - let timestamp = new Date(data.timestamp * 1000); + function tooLate() { + return setTimeout(() => { + client.emit(Constants.Events.TYPING_STOP, channel, user, channel.typingMap[user.id]); + delete channel.typingMap[user.id]; + }, 6000); + } - if (channel && user) { - if (channel.typingMap[user.id]) { - // already typing, renew - let mapping = channel.typingMap[user.id]; - mapping.lastTimestamp = timestamp; - mapping.resetTimeout(tooLate()); - } else { - channel.typingMap[user.id] = new TypingData(timestamp, timestamp, tooLate()); - client.emit(Constants.Events.TYPING_START, channel, user); - } - } + if (channel && user) { + if (channel.typingMap[user.id]) { + // already typing, renew + const mapping = channel.typingMap[user.id]; + mapping.lastTimestamp = timestamp; + mapping.resetTimeout(tooLate()); + } else { + channel.typingMap[user.id] = new TypingData(timestamp, timestamp, tooLate()); + client.emit(Constants.Events.TYPING_START, channel, user); + } + } + } - function tooLate() { - return setTimeout(() => { - client.emit(Constants.Events.TYPING_STOP, channel, user, channel.typingMap[user.id]); - delete channel.typingMap[user.id]; - }, 6000); - } - } - -}; +} module.exports = TypingStartHandler; diff --git a/src/client/websocket/packets/handlers/UserUpdate.js b/src/client/websocket/packets/handlers/UserUpdate.js index 8cefe8fcd..f1d6db65c 100644 --- a/src/client/websocket/packets/handlers/UserUpdate.js +++ b/src/client/websocket/packets/handlers/UserUpdate.js @@ -1,28 +1,14 @@ -'use strict'; - const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); -const CloneObject = name => require(`../../../../util/CloneObject`); -const Constants = require(`../../../../util/Constants`); - -const ClientUser = Structure('ClientUser'); -const Guild = Structure('Guild'); -const DMChannel = Structure('DMChannel'); class UserUpdateHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; + client.actions.UserUpdate.handle(data); + } - let response = client.actions.UserUpdate.handle(data); - - } - -}; +} module.exports = UserUpdateHandler; diff --git a/src/client/websocket/packets/handlers/VoiceStateUpdate.js b/src/client/websocket/packets/handlers/VoiceStateUpdate.js index 3838b7007..de7ac687a 100644 --- a/src/client/websocket/packets/handlers/VoiceStateUpdate.js +++ b/src/client/websocket/packets/handlers/VoiceStateUpdate.js @@ -1,43 +1,34 @@ -'use strict'; - const AbstractHandler = require('./AbstractHandler'); -const Structure = name => require(`../../../../structures/${name}`); -const Constants = require('../../../../util/Constants'); -const CloneObject = require('../../../../util/CloneObject'); -const Role = Structure('User'); +const Constants = require('../../../../util/Constants'); +const cloneObject = require('../../../../util/CloneObject'); class VoiceStateUpdateHandler extends AbstractHandler { - constructor(packetManager) { - super(packetManager); - } + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; + const guild = client.store.get('guilds', data.guild_id); - handle(packet) { - let data = packet.d; - let client = this.packetManager.client; - let guild = client.store.get('guilds', data.guild_id); + if (guild) { + const member = guild.store.get('members', data.user_id); + if (member) { + const oldVoiceChannelMember = cloneObject(member); + if (member.voiceChannel && member.voiceChannel.id !== data.channel_id) { + member.voiceChannel.store.remove('members', oldVoiceChannelMember); + } - if (guild) { - let member = guild.store.get('members', data.user_id); - let channel = guild.store.get('channels', data.channel_id); - if (member) { - let oldVoiceChannelMember = CloneObject(member); - if (member.voiceChannel && member.voiceChannel.id !== data.channel_id) { - member.voiceChannel.store.remove('members', oldVoiceChannelMember); - } + member.serverMute = data.mute; + member.serverDeaf = data.deaf; + member.selfMute = data.self_mute; + member.selfDeaf = data.self_deaf; + member.voiceSessionID = data.session_id; + member.voiceChannelID = data.channel_id; + client.emit(Constants.Events.VOICE_STATE_UPDATE, oldVoiceChannelMember, member); + } + } + } - member.serverMute = data.mute; - member.serverDeaf = data.deaf; - member.selfMute = data.self_mute; - member.selfDeaf = data.self_deaf; - member.voiceSessionID = data.session_id; - member.voiceChannelID = data.channel_id; - client.emit(Constants.Events.VOICE_STATE_UPDATE, oldVoiceChannelMember, member); - } - } - } - -}; +} module.exports = VoiceStateUpdateHandler; diff --git a/src/index.js b/src/index.js index 6dc2c55cb..e5f018673 100644 --- a/src/index.js +++ b/src/index.js @@ -1,10 +1,8 @@ -'use strict'; - const values = require('object.values'); const Client = require('./client/Client'); if (!Object.values) { - values.shim(); + values.shim(); } exports.Client = Client; diff --git a/src/structures/Channel.js b/src/structures/Channel.js index d6c3a9822..c9bed1141 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -1,26 +1,24 @@ -'use strict'; - class Channel { - constructor(client, data, guild) { - this.client = client; - this.typingMap = {}; - this.typingTimeouts = []; - if (guild) { - this.guild = guild; - } + constructor(client, data, guild) { + this.client = client; + this.typingMap = {}; + this.typingTimeouts = []; + if (guild) { + this.guild = guild; + } - if (data) { - this.setup(data); - } - } + if (data) { + this.setup(data); + } + } - setup(data) { - this.id = data.id; - } + setup(data) { + this.id = data.id; + } - delete() { - return this.client.rest.methods.DeleteChannel(this); - } + delete() { + return this.client.rest.methods.deleteChannel(this); + } } module.exports = Channel; diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 923c571dd..412587785 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -1,37 +1,31 @@ -'use strict'; - const User = require('./User'); class ClientUser extends User { - constructor(client, data) { - super(client, data); - } + setup(data) { + super.setup(data); + this.verified = data.verified; + this.email = data.email; + } - setup(data) { - super.setup(data); - this.verified = data.verified; - this.email = data.email; - } + setUsername(username) { + return this.client.rest.methods.updateCurrentUser({ username }); + } - setUsername(username) { - return this.client.rest.methods.UpdateCurrentUser({ username, }); - } + setEmail(email) { + return this.client.rest.methods.updateCurrentUser({ email }); + } - setEmail(email) { - return this.client.rest.methods.UpdateCurrentUser({ email, }); - } + setPassword(password) { + return this.client.rest.methods.updateCurrentUser({ password }); + } - setPassword(password) { - return this.client.rest.methods.UpdateCurrentUser({ password, }); - } + setAvatar(avatar) { + return this.client.rest.methods.updateCurrentUser({ avatar }); + } - setAvatar(avatar) { - return this.client.rest.methods.UpdateCurrentUser({ avatar, }); - } - - edit(data) { - return this.client.rest.methods.UpdateCurrentUser(data); - } + edit(data) { + return this.client.rest.methods.updateCurrentUser(data); + } } module.exports = ClientUser; diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index f0b7523b2..53d0be758 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -1,40 +1,38 @@ -'use strict'; - const Channel = require('./Channel'); const TextBasedChannel = require('./interface/TextBasedChannel'); const User = require('./User'); const TextChannelDataStore = require('./datastore/TextChannelDataStore'); -class DMChannel extends Channel{ - constructor(client, data) { - super(client, data); - this.store = new TextChannelDataStore(); - } +class DMChannel extends Channel { + constructor(client, data) { + super(client, data); + this.store = new TextChannelDataStore(); + } - _cacheMessage(message) { - let maxSize = this.client.options.max_message_cache; - if (maxSize === 0) { - // saves on performance - return; - } + _cacheMessage(message) { + const maxSize = this.client.options.max_message_cache; + if (maxSize === 0) { + // saves on performance + return; + } - let storeKeys = Object.keys(this.store); - if (storeKeys.length >= maxSize) { - this.store.remove(storeKeys[0]); - } + const storeKeys = Object.keys(this.store); + if (storeKeys.length >= maxSize) { + this.store.remove(storeKeys[0]); + } - this.store.add('messages', message); - } + this.store.add('messages', message); + } - setup(data) { - super.setup(data); - this.recipient = this.client.store.add('users', new User(this.client, data.recipient)); - this.lastMessageID = data.last_message_id; - } + setup(data) { + super.setup(data); + this.recipient = this.client.store.add('users', new User(this.client, data.recipient)); + this.lastMessageID = data.last_message_id; + } - toString() { - return this.recipient.toString(); - } + toString() { + return this.recipient.toString(); + } } TextBasedChannel.applyToClass(DMChannel); diff --git a/src/structures/EvaluatedPermissions.js b/src/structures/EvaluatedPermissions.js index 30ef07844..32ac3557d 100644 --- a/src/structures/EvaluatedPermissions.js +++ b/src/structures/EvaluatedPermissions.js @@ -1,39 +1,37 @@ -'use strict'; - -const Constants = require('../Util/Constants'); +const Constants = require('../util/Constants'); class EvaluatedPermissions { - constructor(member, permissions) { - this.member = member; - this.permissions = permissions; - } + constructor(member, permissions) { + this.member = member; + this.permissions = permissions; + } - serialize() { - let serializedPermissions = {}; - for (let permissionName in Constants.PermissionFlags) { - serializedPermissions[permissionName] = this.hasPermission(permissionName); - } + serialize() { + const serializedPermissions = {}; + for (const permissionName in Constants.PermissionFlags) { + serializedPermissions[permissionName] = this.hasPermission(permissionName); + } - return serializedPermissions; - } + return serializedPermissions; + } - hasPermission(permission, explicit) { - if (permission instanceof String || typeof permission === 'string') { - permission = Constants.PermissionFlags[permission]; - } + hasPermission(permission, explicit) { + if (permission instanceof String || typeof permission === 'string') { + permission = Constants.PermissionFlags[permission]; + } - if (!permission) { - throw Constants.Errors.NOT_A_PERMISSION; - } + if (!permission) { + throw Constants.Errors.NOT_A_PERMISSION; + } - if (!explicit) { - if ((this.permissions & Constants.PermissionFlags.ADMINISTRATOR) > 0) { - return true; - } - } + if (!explicit) { + if ((this.permissions & Constants.PermissionFlags.ADMINISTRATOR) > 0) { + return true; + } + } - return ((this.permissions & permission) > 0); - } + return ((this.permissions & permission) > 0); + } } module.exports = EvaluatedPermissions; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index b5bd9f5b3..596d9bf7a 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -1,244 +1,240 @@ -'use strict'; - const User = require('./User'); const GuildMember = require('./GuildMember'); const GuildDataStore = require('./datastore/GuildDataStore'); -const TextChannel = require('./TextChannel'); -const VoiceChannel = require('./VoiceChannel'); -const Constants = require('../Util/Constants'); +const Constants = require('../util/Constants'); const Role = require('./Role'); function arraysEqual(a, b) { - if (a === b) return true; - if (a.length !== b.length) return false; + if (a === b) return true; + if (a.length !== b.length) return false; - for (let itemInd in a) { - let item = a[itemInd]; - let ind = b.indexOf(item); - if (ind) { - b.splice(ind, 1); - } - } + for (const itemInd in a) { + const item = a[itemInd]; + const ind = b.indexOf(item); + if (ind) { + b.splice(ind, 1); + } + } - return b.length === 0; + return b.length === 0; } class Guild { - constructor(client, data) { - this.client = client; - this.store = new GuildDataStore(); + constructor(client, data) { + this.client = client; + this.store = new GuildDataStore(); - if (!data) { - return; - } + if (!data) { + return; + } - if (data.unavailable) { - this.available = false; - this.id = data.id; - } else { - this.available = true; - this.setup(data); - } - } + if (data.unavailable) { + this.available = false; + this.id = data.id; + } else { + this.available = true; + this.setup(data); + } + } - _addMember(guildUser, noEvent) { - if (!(guildUser.user instanceof User)) { - guildUser.user = this.client.store.NewUser(guildUser.user); - } + _addMember(guildUser, noEvent) { + if (!(guildUser.user instanceof User)) { + guildUser.user = this.client.store.newUser(guildUser.user); + } - guildUser.joined_at = guildUser.joined_at || 0; - let member = this.store.add('members', new GuildMember(this, guildUser)); - if (this.client.ws.status === Constants.Status.READY && !noEvent) { - this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, member); - } + guildUser.joined_at = guildUser.joined_at || 0; + const member = this.store.add('members', new GuildMember(this, guildUser)); + if (this.client.ws.status === Constants.Status.READY && !noEvent) { + this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, member); + } - return member; - } + return member; + } - _updateMember(member, data) { - let oldRoles = member.roles; + _updateMember(member, data) { + const oldRoles = member.roles; - member._roles = data.roles; - if (this.client.ws.status === Constants.Status.READY) { - this.client.emit(Constants.Events.GUILD_MEMBER_ROLES_UPDATE, this, oldRoles, member.roles); - } - } + member._roles = data.roles; + if (this.client.ws.status === Constants.Status.READY) { + this.client.emit(Constants.Events.GUILD_MEMBER_ROLES_UPDATE, this, oldRoles, member.roles); + } + } - _removeMember(guildMember) { - this.store.remove('members', guildMember); - } + _removeMember(guildMember) { + this.store.remove('members', guildMember); + } - toString() { - return this.name; - } + toString() { + return this.name; + } - kick(member) { - return this.member(member).kick(); - } + kick(member) { + return this.member(member).kick(); + } - member(user) { - return this.client.resolver.ResolveGuildMember(this, user); - } + member(user) { + return this.client.resolver.resolveGuildMember(this, user); + } - equals(data) { - let base = - this.id === data.id && - this.available === !data.unavailable && - this.splash === data.splash && - this.region === data.region && - this.name === data.name && - this.memberCount === data.member_count && - this.large === data.large && - this.icon === data.icon && - arraysEqual(this.features, data.features) && - this.owner.id === data.owner_id && - this.verificationLevel === data.verification_level && - this.embedEnabled === data.embed_enabled; + equals(data) { + let base = + this.id === data.id && + this.available === !data.unavailable && + this.splash === data.splash && + this.region === data.region && + this.name === data.name && + this.memberCount === data.member_count && + this.large === data.large && + this.icon === data.icon && + arraysEqual(this.features, data.features) && + this.owner.id === data.owner_id && + this.verificationLevel === data.verification_level && + this.embedEnabled === data.embed_enabled; - if (base) { - if (this.embedChannel) { - if (this.embedChannel.id !== data.embed_channel_id) { - base = false; - } - } else if (data.embed_channel_id) { - base = false; - } - } + if (base) { + if (this.embedChannel) { + if (this.embedChannel.id !== data.embed_channel_id) { + base = false; + } + } else if (data.embed_channel_id) { + base = false; + } + } - return base; - } + return base; + } - setup(data) { - this.id = data.id; - this.available = !data.unavailable; - this.splash = data.splash; - this.region = data.region; - this.name = data.name; - this.memberCount = data.member_count; - this.large = data.large; - this.joinDate = new Date(data.joined_at); - this.icon = data.icon; - this.features = data.features; - this.emojis = data.emojis; - this.afkTimeout = data.afk_timeout; - this.afkChannelID = data.afk_channel_id; - this.embedEnabled = data.embed_enabled; - this.verificationLevel = data.verification_level; - this.features = data.features || []; + setup(data) { + this.id = data.id; + this.available = !data.unavailable; + this.splash = data.splash; + this.region = data.region; + this.name = data.name; + this.memberCount = data.member_count; + this.large = data.large; + this.joinDate = new Date(data.joined_at); + this.icon = data.icon; + this.features = data.features; + this.emojis = data.emojis; + this.afkTimeout = data.afk_timeout; + this.afkChannelID = data.afk_channel_id; + this.embedEnabled = data.embed_enabled; + this.verificationLevel = data.verification_level; + this.features = data.features || []; - if (data.members) { - this.store.clear('members'); - for (let guildUser of data.members) { - this._addMember(guildUser); - } - } + if (data.members) { + this.store.clear('members'); + for (const guildUser of data.members) { + this._addMember(guildUser); + } + } - this.owner = this.store.get('members', data.owner_id); + this.owner = this.store.get('members', data.owner_id); - if (data.channels) { - this.store.clear('channels'); - for (let channel of data.channels) { - this.client.store.NewChannel(channel, this); - } - } + if (data.channels) { + this.store.clear('channels'); + for (const channel of data.channels) { + this.client.store.newChannel(channel, this); + } + } - this.embedChannel = this.store.get('channels', data.embed_channel_id); + this.embedChannel = this.store.get('channels', data.embed_channel_id); - if (data.roles) { - this.store.clear('roles'); - for (let role of data.roles) { - this.store.add('roles', new Role(this, role)); - } - } + if (data.roles) { + this.store.clear('roles'); + for (const role of data.roles) { + this.store.add('roles', new Role(this, role)); + } + } - if (data.presences) { - for (let presence of data.presences) { - let user = this.client.store.get('users', presence.user.id); - if (user) { - user.status = presence.status; - user.game = presence.game; - } - } - } + if (data.presences) { + for (const presence of data.presences) { + const user = this.client.store.get('users', presence.user.id); + if (user) { + user.status = presence.status; + user.game = presence.game; + } + } + } - if (data.voice_states) { - for (let voiceState of data.voice_states) { - let member = this.store.get('members', voiceState.user_id); - if (member) { - member.serverMute = voiceState.mute; - member.serverDeaf = voiceState.deaf; - member.selfMute = voiceState.self_mute; - member.selfDeaf = voiceState.self_deaf; - member.voiceSessionID = voiceState.session_id; - member.voiceChannelID = voiceState.channel_id; - } - } - } - } + if (data.voice_states) { + for (const voiceState of data.voice_states) { + const member = this.store.get('members', voiceState.user_id); + if (member) { + member.serverMute = voiceState.mute; + member.serverDeaf = voiceState.deaf; + member.selfMute = voiceState.self_mute; + member.selfDeaf = voiceState.self_deaf; + member.voiceSessionID = voiceState.session_id; + member.voiceChannelID = voiceState.channel_id; + } + } + } + } - createChannel(name, type) { - return this.client.rest.methods.CreateChannel(this, name, type); - } + createChannel(name, type) { + return this.client.rest.methods.createChannel(this, name, type); + } - createRole() { - return this.client.rest.methods.CreateGuildRole(this); - } + createRole() { + return this.client.rest.methods.createGuildRole(this); + } - leave() { - return this.client.rest.methods.LeaveGuild(this); - } + leave() { + return this.client.rest.methods.leaveGuild(this); + } - delete() { - return this.client.rest.methods.DeleteGuild(this); - } + delete() { + return this.client.rest.methods.deleteGuild(this); + } - edit(data) { - return this.client.rest.methods.UpdateGuild(this, data); - } + edit(data) { + return this.client.rest.methods.updateGuild(this, data); + } - setName(name) { - return this.edit({ name, }); - } + setName(name) { + return this.edit({ name }); + } - setRegion(region) { - return this.edit({ region, }); - } + setRegion(region) { + return this.edit({ region }); + } - setVerificationLevel(verificationLevel) { - return this.edit({ verificationLevel, }); - } + setVerificationLevel(verificationLevel) { + return this.edit({ verificationLevel }); + } - setAFKChannel(afkchannel) { - return this.edit({ afkChannel, }); - } + setAFKChannel(afkChannel) { + return this.edit({ afkChannel }); + } - setAFKTimeout(afkTimeout) { - return this.edit({ afkTimeout, }); - } + setAFKTimeout(afkTimeout) { + return this.edit({ afkTimeout }); + } - setIcon(icon) { - return this.edit({ icon, }); - } + setIcon(icon) { + return this.edit({ icon }); + } - setOwner(owner) { - return this.edit({ owner, }); - } + setOwner(owner) { + return this.edit({ owner }); + } - setSplash(splash) { - return this.edit({ splash, }); - } + setSplash(splash) { + return this.edit({ splash }); + } - get channels() { return this.store.getAsArray('channels'); } + get channels() { return this.store.getAsArray('channels'); } - get $channels() { return this.store.data.channels; } + get $channels() { return this.store.data.channels; } - get roles() { return this.store.getAsArray('roles'); } + get roles() { return this.store.getAsArray('roles'); } - get $roles() { return this.store.data.roles; } + get $roles() { return this.store.data.roles; } - get members() { return this.store.getAsArray('members'); } + get members() { return this.store.getAsArray('members'); } - get $members() { return this.store.data.members; } + get $members() { return this.store.data.members; } } module.exports = Guild; diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index d35cc163d..6c1b11afc 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -1,71 +1,69 @@ -'use strict'; - const TextBasedChannel = require('./interface/TextBasedChannel'); class GuildMember { - constructor(guild, data) { - this.client = guild.client; - this.guild = guild; - this.user = {}; - this._roles = []; - if (data) { - this.setup(data); - } - } + constructor(guild, data) { + this.client = guild.client; + this.guild = guild; + this.user = {}; + this._roles = []; + if (data) { + this.setup(data); + } + } - setup(data) { - this.user = data.user; - this.serverDeaf = data.deaf; - this.serverMute = data.mute; - this.selfMute = data.self_mute; - this.selfDeaf = data.self_deaf; - this.voiceSessionID = data.session_id; - this.voiceChannelID = data.channel_id; - this.joinDate = new Date(data.joined_at); - this._roles = data.roles; - } + setup(data) { + this.user = data.user; + this.serverDeaf = data.deaf; + this.serverMute = data.mute; + this.selfMute = data.self_mute; + this.selfDeaf = data.self_deaf; + this.voiceSessionID = data.session_id; + this.voiceChannelID = data.channel_id; + this.joinDate = new Date(data.joined_at); + this._roles = data.roles; + } - get roles() { - let list = []; - let everyoneRole = this.guild.store.get('roles', this.guild.id); + get roles() { + const list = []; + const everyoneRole = this.guild.store.get('roles', this.guild.id); - if (everyoneRole) { - list.push(everyoneRole); - } + if (everyoneRole) { + list.push(everyoneRole); + } - for (let roleID of this._roles) { - let role = this.guild.store.get('roles', roleID); - if (role) { - list.push(role); - } - } + for (const roleID of this._roles) { + const role = this.guild.store.get('roles', roleID); + if (role) { + list.push(role); + } + } - return list; - } + return list; + } - get mute() { - return this.selfMute || this.serverMute; - } + get mute() { + return this.selfMute || this.serverMute; + } - get deaf() { - return this.selfDeaf || this.serverDeaf; - } + get deaf() { + return this.selfDeaf || this.serverDeaf; + } - get voiceChannel() { - return this.guild.store.get('channels', this.voiceChannelID); - } + get voiceChannel() { + return this.guild.store.get('channels', this.voiceChannelID); + } - get id() { - return this.user.id; - } + get id() { + return this.user.id; + } - deleteDM() { - return this.client.rest.methods.DeleteChannel(this); - } + deleteDM() { + return this.client.rest.methods.deleteChannel(this); + } - kick() { - return this.client.rest.methods.KickGuildMember(this.guild, this); - } + kick() { + return this.client.rest.methods.kickGuildMember(this.guild, this); + } } TextBasedChannel.applyToClass(GuildMember); diff --git a/src/structures/Message.js b/src/structures/Message.js index d5118ca70..b565737ce 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -1,111 +1,117 @@ -'use strict'; - class Message { - constructor(channel, data, client) { - this.channel = channel; + constructor(channel, data, client) { + this.channel = channel; - if (channel.guild) { - this.guild = channel.guild; - } + if (channel.guild) { + this.guild = channel.guild; + } - this.client = client; - if (data) { - this.setup(data); - } - } + this.client = client; + if (data) { + this.setup(data); + } + } - setup(data) { - this.author = this.client.store.NewUser(data.author); - this.content = data.content; - this.timestamp = new Date(data.timestamp); - this.editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp) : null; - this.tts = data.tts; - this.mentionEveryone = data.mention_everyone; - this.nonce = data.nonce; - this.embeds = data.embeds; - this.attachments = data.attachments; - this.mentions = []; - this.id = data.id; - for (let mention of data.mentions) { - let user = this.client.store.get('users', mention.id); - if (user) { - this.mentions.push(user); - } else { - user = this.client.store.NewUser(mention); - this.mentions.push(user); - } - } - } + setup(data) { + this.author = this.client.store.newUser(data.author); + this.content = data.content; + this.timestamp = new Date(data.timestamp); + this.editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp) : null; + this.tts = data.tts; + this.mentionEveryone = data.mention_everyone; + this.nonce = data.nonce; + this.embeds = data.embeds; + this.attachments = data.attachments; + this.mentions = []; + this.id = data.id; + for (const mention of data.mentions) { + let user = this.client.store.get('users', mention.id); + if (user) { + this.mentions.push(user); + } else { + user = this.client.store.newUser(mention); + this.mentions.push(user); + } + } + } - patch(data) { - if (data.author) - this.author = this.client.store.get('users', data.author.id); - if (data.content) - this.content = data.content; - if (data.timestamp) - this.timestamp = new Date(data.timestamp); - if (data.edited_timestamp) - this.editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp) : null; - if (data.tts) - this.tts = data.tts; - if (data.mention_everyone) - this.mentionEveryone = data.mention_everyone; - if (data.nonce) - this.nonce = data.nonce; - if (data.embeds) - this.embeds = data.embeds; - if (data.attachments) - this.attachments = data.attachments; - if (data.mentions) { - for (let mention of data.mentions) { - let user = this.client.store.get('users', mention.id); - if (user) { - this.mentions.push(user); - } else { - user = this.client.store.NewUser(mention); - this.mentions.push(user); - } - } - } + patch(data) { + if (data.author) { + this.author = this.client.store.get('users', data.author.id); + } + if (data.content) { + this.content = data.content; + } + if (data.timestamp) { + this.timestamp = new Date(data.timestamp); + } + if (data.edited_timestamp) { + this.editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp) : null; + } + if (data.tts) { + this.tts = data.tts; + } + if (data.mention_everyone) { + this.mentionEveryone = data.mention_everyone; + } + if (data.nonce) { + this.nonce = data.nonce; + } + if (data.embeds) { + this.embeds = data.embeds; + } + if (data.attachments) { + this.attachments = data.attachments; + } + if (data.mentions) { + for (const mention of data.mentions) { + let user = this.client.store.get('users', mention.id); + if (user) { + this.mentions.push(user); + } else { + user = this.client.store.newUser(mention); + this.mentions.push(user); + } + } + } - if (data.id) - this.id = data.id; - } + if (data.id) { + this.id = data.id; + } + } - equals(message, rawData) { + equals(message, rawData) { + const embedUpdate = !message.author && !message.attachments; - let embedUpdate = !message.author && !message.attachments; + if (embedUpdate) { + const base = this.id === message.id && + this.embeds.length === message.embeds.length; + return base; + } + let base = this.id === message.id && + this.author.id === message.author.id && + this.content === message.content && + this.tts === message.tts && + this.nonce === message.nonce && + this.embeds.length === message.embeds.length && + this.attachments.length === message.attachments.length; - if (embedUpdate) { - let base = this.id === message.id && - this.embeds.length === message.embeds.length; - return base; - } else { - let base = this.id === message.id && - this.author.id === message.author.id && - this.content === message.content && - this.tts === message.tts && - this.nonce === message.nonce && - this.embeds.length === message.embeds.length && - this.attachments.length === message.attachments.length; + if (base && rawData) { + base = this.mentionEveryone === message.mentionEveryone && + this.timestamp.getTime() === new Date(rawData.timestamp).getTime() && + this.editedTimestamp === new Date(rawData.edited_timestamp).getTime(); + } - if (base && rawData) { - base = this.mentionEveryone === message.mentionEveryone && - this.timestamp.getTime() === new Date(data.timestamp).getTime() && - this.editedTimestamp === new Date(data.edited_timestamp).getTime(); - } + return base; + } - return base; - } - } + delete() { + return this.client.rest.methods.deleteMessage(this); + } - delete() { - return this.client.rest.methods.DeleteMessage(this); - } - - edit(content) { - return this.client.rest.methods.UpdateMessage(this, content); - } + edit(content) { + return this.client.rest.methods.updateMessage(this, content); + } } module.exports = Message; diff --git a/src/structures/PermissionOverwrites.js b/src/structures/PermissionOverwrites.js index 717c94d46..47177d3fc 100644 --- a/src/structures/PermissionOverwrites.js +++ b/src/structures/PermissionOverwrites.js @@ -1,19 +1,17 @@ -'use strict'; - class PermissionOverwrites { - constructor(serverChannel, data) { - this.channel = serverChannel; - if (data) { - this.setup(data); - } - } + constructor(serverChannel, data) { + this.channel = serverChannel; + if (data) { + this.setup(data); + } + } - setup(data) { - this.type = data.type; - this.id = data.id; - this.denyData = data.deny; - this.allowData = data.allow; - } + setup(data) { + this.type = data.type; + this.id = data.id; + this.denyData = data.deny; + this.allowData = data.allow; + } } module.exports = PermissionOverwrites; diff --git a/src/structures/Role.js b/src/structures/Role.js index f163ff98e..9d14c9074 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -1,92 +1,90 @@ -'use strict'; - -const Constants = require('../Util/Constants'); +const Constants = require('../util/Constants'); class Role { - constructor(guild, data) { - this.guild = guild; - this.client = guild.client; - if (data) { - this.setup(data); - } - } + constructor(guild, data) { + this.guild = guild; + this.client = guild.client; + if (data) { + this.setup(data); + } + } - equals(role) { - return ( - this.id === role.id && - this.name === role.name && - this.color === role.color && - this.hoist === role.hoist && - this.position === role.position && - this.permissions === role.permissions && - this.managed === role.managed - ); - } + equals(role) { + return ( + this.id === role.id && + this.name === role.name && + this.color === role.color && + this.hoist === role.hoist && + this.position === role.position && + this.permissions === role.permissions && + this.managed === role.managed + ); + } - setup(data) { - this.id = data.id; - this.name = data.name; - this.color = data.color; - this.hoist = data.hoist; - this.position = data.position; - this.permissions = data.permissions; - this.managed = data.managed; - } + setup(data) { + this.id = data.id; + this.name = data.name; + this.color = data.color; + this.hoist = data.hoist; + this.position = data.position; + this.permissions = data.permissions; + this.managed = data.managed; + } - delete() { - return this.client.rest.methods.DeleteGuildRole(this); - } + delete() { + return this.client.rest.methods.deleteGuildRole(this); + } - edit(data) { - return this.client.rest.methods.UpdateGuildRole(this, data); - } + edit(data) { + return this.client.rest.methods.updateGuildRole(this, data); + } - setName(name) { - return this.client.rest.methods.UpdateGuildRole(this, {name,}); - } + setName(name) { + return this.client.rest.methods.updateGuildRole(this, { name }); + } - setColor(color) { - return this.client.rest.methods.UpdateGuildRole(this, {color,}); - } + setColor(color) { + return this.client.rest.methods.updateGuildRole(this, { color }); + } - setHoist(hoist) { - return this.client.rest.methods.UpdateGuildRole(this, {hoist,}); - } + setHoist(hoist) { + return this.client.rest.methods.updateGuildRole(this, { hoist }); + } - setPosition(position) { - return this.client.rest.methods.UpdateGuildRole(this, {position,}); - } + setPosition(position) { + return this.client.rest.methods.updateGuildRole(this, { position }); + } - setPermissions(permissions) { - return this.client.rest.methods.UpdateGuildRole(this, {permissions,}); - } + setPermissions(permissions) { + return this.client.rest.methods.updateGuildRole(this, { permissions }); + } - serialize() { - let serializedPermissions = {}; - for (let permissionName in Constants.PermissionFlags) { - serializedPermissions[permissionName] = this.hasPermission(permissionName); - } + serialize() { + const serializedPermissions = {}; + for (const permissionName in Constants.PermissionFlags) { + serializedPermissions[permissionName] = this.hasPermission(permissionName); + } - return serializedPermissions; - } + return serializedPermissions; + } - hasPermission(permission, explicit) { - if (permission instanceof String || typeof permission === 'string') { - permission = Constants.PermissionFlags[permission]; - } + hasPermission(permission, explicit) { + if (permission instanceof String || typeof permission === 'string') { + permission = Constants.PermissionFlags[permission]; + } - if (!permission) { - throw Constants.Errors.NOT_A_PERMISSION; - } + if (!permission) { + throw Constants.Errors.NOT_A_PERMISSION; + } - if (!explicit) { - if ((this.permissions & Constants.PermissionFlags.ADMINISTRATOR) > 0) { - return true; - } - } + if (!explicit) { + if ((this.permissions & Constants.PermissionFlags.ADMINISTRATOR) > 0) { + return true; + } + } - return ((this.permissions & permission) > 0); - } + return ((this.permissions & permission) > 0); + } } module.exports = Role; diff --git a/src/structures/ServerChannel.js b/src/structures/ServerChannel.js index 3ff271477..2e7ee4f93 100644 --- a/src/structures/ServerChannel.js +++ b/src/structures/ServerChannel.js @@ -1,151 +1,149 @@ -'use strict'; - const Channel = require('./Channel'); const PermissionOverwrites = require('./PermissionOverwrites'); const EvaluatedPermissions = require('./EvaluatedPermissions'); const Constants = require('../util/Constants'); function arraysEqual(a, b) { - if (a === b) return true; - if (a.length !== b.length) return false; + if (a === b) return true; + if (a.length !== b.length) return false; - for (let itemInd in a) { - let item = a[itemInd]; - let ind = b.indexOf(item); - if (ind) { - b.splice(ind, 1); - } - } + for (const itemInd in a) { + const item = a[itemInd]; + const ind = b.indexOf(item); + if (ind) { + b.splice(ind, 1); + } + } - return b.length === 0; + return b.length === 0; } -class ServerChannel extends Channel{ - constructor(guild, data) { - super(guild.client, data, guild); - } +class ServerChannel extends Channel { + constructor(guild, data) { + super(guild.client, data, guild); + } - setup(data) { - super.setup(data); - this.type = data.type; - this.topic = data.topic; - this.position = data.position; - this.name = data.name; - this.lastMessageID = data.last_message_id; - this.ow = data.permission_overwrites; - this.permissionOverwrites = []; - if (data.permission_overwrites) { - for (let overwrite of data.permission_overwrites) { - this.permissionOverwrites.push(new PermissionOverwrites(this, overwrite)); - } - } - } + setup(data) { + super.setup(data); + this.type = data.type; + this.topic = data.topic; + this.position = data.position; + this.name = data.name; + this.lastMessageID = data.last_message_id; + this.ow = data.permission_overwrites; + this.permissionOverwrites = []; + if (data.permission_overwrites) { + for (const overwrite of data.permission_overwrites) { + this.permissionOverwrites.push(new PermissionOverwrites(this, overwrite)); + } + } + } - equals(other) { - let base = ( - this.type === other.type && - this.topic === other.topic && - this.position === other.position && - this.name === other.name && - this.id === other.id - ); + equals(other) { + let base = ( + this.type === other.type && + this.topic === other.topic && + this.position === other.position && + this.name === other.name && + this.id === other.id + ); - if (base) { - if (other.permission_overwrites) { - let thisIDSet = this.permissionOverwrites.map(overwrite => overwrite.id); - let otherIDSet = other.permission_overwrites.map(overwrite => overwrite.id); - if (arraysEqual(thisIDSet, otherIDSet)) { - base = true; - } else { - base = false; - } - } else { - base = false; - } - } + if (base) { + if (other.permission_overwrites) { + const thisIDSet = this.permissionOverwrites.map(overwrite => overwrite.id); + const otherIDSet = other.permission_overwrites.map(overwrite => overwrite.id); + if (arraysEqual(thisIDSet, otherIDSet)) { + base = true; + } else { + base = false; + } + } else { + base = false; + } + } - return base; - } + return base; + } - permissionsFor(member) { - member = this.client.resolver.ResolveGuildMember(this.guild, member); - if (member) { - if (this.guild.owner.id === member.id) { - return new EvaluatedPermissions(member, Constants.ALL_PERMISSIONS); - } + permissionsFor(member) { + member = this.client.resolver.resolveGuildMember(this.guild, member); + if (member) { + if (this.guild.owner.id === member.id) { + return new EvaluatedPermissions(member, Constants.ALL_PERMISSIONS); + } - let roles = member.roles; - let permissions = 0; - let overwrites = this.overwritesFor(member, true); + const roles = member.roles; + let permissions = 0; + const overwrites = this.overwritesFor(member, true); - for (let role of roles) { - permissions |= role.permissions; - } + for (const role of roles) { + permissions |= role.permissions; + } - for (let overwrite of overwrites.role.concat(overwrites.member)) { - permissions = permissions & ~overwrite.denyData; - permissions = permissions | overwrite.allowData; - } + for (const overwrite of overwrites.role.concat(overwrites.member)) { + permissions &= ~overwrite.denyData; + permissions |= overwrite.allowData; + } - if (!!(permissions & (Constants.PermissionFlags.MANAGE_ROLES))) { - permissions = Constants.ALL_PERMISSIONS; - } + const admin = Boolean(permissions & (Constants.PermissionFlags.MANAGE_ROLES)); + if (admin) { + permissions = Constants.ALL_PERMISSIONS; + } - return new EvaluatedPermissions(member, permissions); - } - } + return new EvaluatedPermissions(member, permissions); + } + return null; + } - overwritesFor(member, verified) { - // for speed - if (!verified) - member = this.client.resolver.ResolveGuildMember(this.guild, member); - if (member) { - let found = []; - let memberRoles = member._roles; + overwritesFor(member, verified) { + // for speed + if (!verified) member = this.client.resolver.resolveGuildMember(this.guild, member); + if (member) { + const memberRoles = member._roles; - let roleOverwrites = []; - let memberOverwrites = []; + const roleOverwrites = []; + const memberOverwrites = []; - for (let overwrite of this.permissionOverwrites) { - if (overwrite.id === member.id) { - memberOverwrites.push(overwrite); - } else if (memberRoles.indexOf(overwrite.id) > -1) { - roleOverwrites.push(overwrite); - } - } + for (const overwrite of this.permissionOverwrites) { + if (overwrite.id === member.id) { + memberOverwrites.push(overwrite); + } else if (memberRoles.indexOf(overwrite.id) > -1) { + roleOverwrites.push(overwrite); + } + } - return { - role: roleOverwrites, - member: memberOverwrites, - }; - } + return { + role: roleOverwrites, + member: memberOverwrites, + }; + } - return []; - } + return []; + } - edit(data) { - return this.client.rest.methods.UpdateChannel(this, data); - } + edit(data) { + return this.client.rest.methods.updateChannel(this, data); + } - setName(name) { - return this.client.rest.methods.UpdateChannel(this, { name, }); - } + setName(name) { + return this.client.rest.methods.updateChannel(this, { name }); + } - setPosition(position) { - return this.rest.client.rest.methods.UpdateChannel(this, { position, }); - } + setPosition(position) { + return this.rest.client.rest.methods.updateChannel(this, { position }); + } - setTopic(topic) { - return this.rest.client.rest.methods.UpdateChannel(this, { topic, }); - } + setTopic(topic) { + return this.rest.client.rest.methods.updateChannel(this, { topic }); + } - setBitrate() { - return this.rest.client.rest.methods.UpdateChannel(this, { bitrate, }); - } + setBitrate(bitrate) { + return this.rest.client.rest.methods.updateChannel(this, { bitrate }); + } - toString() { - return this.name; - } + toString() { + return this.name; + } } module.exports = ServerChannel; diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 73986118c..c87b27ed4 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -1,30 +1,28 @@ -'use strict'; - const ServerChannel = require('./ServerChannel'); const TextChannelDataStore = require('./datastore/TextChannelDataStore'); const TextBasedChannel = require('./interface/TextBasedChannel'); class TextChannel extends ServerChannel { - constructor(guild, data) { - super(guild, data); - this.store = new TextChannelDataStore(); - } + constructor(guild, data) { + super(guild, data); + this.store = new TextChannelDataStore(); + } - _cacheMessage(message) { - let maxSize = this.client.options.max_message_cache; - if (maxSize === 0) { - // saves on performance - return; - } + _cacheMessage(message) { + const maxSize = this.client.options.max_message_cache; + if (maxSize === 0) { + // saves on performance + return null; + } - let storeKeys = Object.keys(this.store); - if (storeKeys.length >= maxSize) { - this.store.remove(storeKeys[0]); - } + const storeKeys = Object.keys(this.store); + if (storeKeys.length >= maxSize) { + this.store.remove(storeKeys[0]); + } - return this.store.add('messages', message); - } + return this.store.add('messages', message); + } } TextBasedChannel.applyToClass(TextChannel); diff --git a/src/structures/User.js b/src/structures/User.js index 2563fccb2..823c8597d 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -1,89 +1,87 @@ -'use strict'; - const TextBasedChannel = require('./interface/TextBasedChannel'); /** * Represents a User on Discord. */ class User { - constructor(client, data) { - this.client = client; - if (data) { - this.setup(data); - } - } + constructor(client, data) { + this.client = client; + if (data) { + this.setup(data); + } + } - setup(data) { - /** - * The username of the User - * @type {String} - */ - this.username = data.username; - /** - * The ID of the User - * @type {String} - */ - this.id = data.id; - /** - * A discriminator based on username for the User - * @type {String} - */ - this.discriminator = data.discriminator; - /** - * The ID of the user's avatar - * @type {String} - */ - this.avatar = data.avatar; - /** - * Whether or not the User is a Bot. - * @type {Boolean} - */ - this.bot = Boolean(data.bot); - /** - * The status of the user: - * - * * **`online`** - user is online - * * **`offline`** - user is offline - * * **`idle`** - user is AFK - * @type {String} - */ - this.status = data.status || this.status || 'offline'; - this.game = data.game || this.game; - } + setup(data) { + /** + * The username of the User + * @type {String} + */ + this.username = data.username; + /** + * The ID of the User + * @type {String} + */ + this.id = data.id; + /** + * A discriminator based on username for the User + * @type {String} + */ + this.discriminator = data.discriminator; + /** + * The ID of the user's avatar + * @type {String} + */ + this.avatar = data.avatar; + /** + * Whether or not the User is a Bot. + * @type {Boolean} + */ + this.bot = Boolean(data.bot); + /** + * The status of the user: + * + * * **`online`** - user is online + * * **`offline`** - user is offline + * * **`idle`** - user is AFK + * @type {String} + */ + this.status = data.status || this.status || 'offline'; + this.game = data.game || this.game; + } - toString() { - return `<@${this.id}>`; - } + toString() { + return `<@${this.id}>`; + } - /** - * Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful. - * @return {Promise} - */ - deleteDM() { - return this.client.rest.methods.DeleteChannel(this); - } + /** + * Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful. + * @return {Promise} + */ + deleteDM() { + return this.client.rest.methods.deleteChannel(this); + } - equals(user) { - let base = ( - this.username === user.username && - this.id === user.id && - this.discriminator === user.discriminator && - this.avatar === user.avatar && - this.bot === Boolean(user.bot) - ); + equals(user) { + let base = ( + this.username === user.username && + this.id === user.id && + this.discriminator === user.discriminator && + this.avatar === user.avatar && + this.bot === Boolean(user.bot) + ); - if (base) { - if (user.status) { - base = this.status === user.status; - } + if (base) { + if (user.status) { + base = this.status === user.status; + } - if (user.game) { - base = this.game === user.game; - } - } + if (user.game) { + base = this.game === user.game; + } + } - return base; - } + return base; + } } TextBasedChannel.applyToClass(User); diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index fb54df361..9c643820d 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -1,18 +1,16 @@ -'use strict'; - const ServerChannel = require('./ServerChannel'); const VoiceChannelDataStore = require('./datastore/VoiceChannelDataStore'); class VoiceChannel extends ServerChannel { - constructor(guild, data) { - super(guild, data); - this.store = new VoiceChannelDataStore(); - } + constructor(guild, data) { + super(guild, data); + this.store = new VoiceChannelDataStore(); + } - setup(data) { - super.setup(data); - this.bitrate = data.bitrate; - } + setup(data) { + super.setup(data); + this.bitrate = data.bitrate; + } } module.exports = VoiceChannel; diff --git a/src/structures/datastore/AbstractDataStore.js b/src/structures/datastore/AbstractDataStore.js index 24bfec497..5ec83ecad 100644 --- a/src/structures/datastore/AbstractDataStore.js +++ b/src/structures/datastore/AbstractDataStore.js @@ -1,43 +1,40 @@ -'use strict'; +class AbstractDataStore { + constructor() { + this.data = {}; + } -class AbstractDataStore{ - constructor() { - this.data = {}; - } + register(name) { + this.data[name] = {}; + } - register(name) { - this.data[name] = {}; - } + add(location, object) { + if (this.data[location][object.id]) { + return this.data[location][object.id]; + } + this.data[location][object.id] = object; + return object; + } - add(location, object) { - if (this.data[location][object.id]) { - return this.data[location][object.id]; - } else { - return this.data[location][object.id] = object; - } - } + clear(location) { + this.data[location] = {}; + } - clear(location) { - this.data[location] = {}; - } + remove(location, object) { + const id = (typeof object === 'string' || object instanceof String) ? object : object.id; + if (this.data[location][id]) { + delete this.data[location][id]; + return true; + } + return false; + } - remove(location, object) { - let id = (typeof object === 'string' || object instanceof String) ? object : object.id; - if (this.data[location][id]) { - delete this.data[location][id]; - return true; - } else { - return false; - } - } + get(location, value) { + return this.data[location][value]; + } - get(location, value) { - return this.data[location][value]; - } - - getAsArray(location) { - return Object.values(this.data[location]); - } + getAsArray(location) { + return Object.values(this.data[location]); + } } module.exports = AbstractDataStore; diff --git a/src/structures/datastore/ClientDataStore.js b/src/structures/datastore/ClientDataStore.js index a7b39c19d..4d0dd0a87 100644 --- a/src/structures/datastore/ClientDataStore.js +++ b/src/structures/datastore/ClientDataStore.js @@ -1,8 +1,6 @@ -'use strict'; - const AbstractDataStore = require('./AbstractDataStore'); const Constants = require('../../util/Constants'); -const CloneObject = require('../../util/CloneObject'); +const cloneObject = require('../../util/CloneObject'); const Guild = require('../Guild'); const User = require('../User'); const DMChannel = require('../DMChannel'); @@ -10,98 +8,99 @@ const TextChannel = require('../TextChannel'); const VoiceChannel = require('../VoiceChannel'); const ServerChannel = require('../ServerChannel'); -class ClientDataStore extends AbstractDataStore{ - constructor(client) { - super(); +class ClientDataStore extends AbstractDataStore { + constructor(client) { + super(); - this.client = client; - this.token = null; - this.session = null; - this.user = null; - this.email = null; - this.password = null; + this.client = client; + this.token = null; + this.session = null; + this.user = null; + this.email = null; + this.password = null; - this.register('users'); - this.register('guilds'); - this.register('channels'); - } + this.register('users'); + this.register('guilds'); + this.register('channels'); + } - get pastReady() { - return this.client.ws.status === Constants.Status.READY; - } + get pastReady() { + return this.client.ws.status === Constants.Status.READY; + } - NewGuild(data) { - let already = this.get('guilds', data.id); - let guild = this.add('guilds', new Guild(this.client, data)); - if (this.pastReady && !already) { - this.client.emit(Constants.Events.GUILD_CREATE, guild); - } + newGuild(data) { + const already = this.get('guilds', data.id); + const guild = this.add('guilds', new Guild(this.client, data)); + if (this.pastReady && !already) { + this.client.emit(Constants.Events.GUILD_CREATE, guild); + } - return guild; - } + return guild; + } - NewUser(data) { - return this.add('users', new User(this.client, data)); - } + newUser(data) { + return this.add('users', new User(this.client, data)); + } - NewChannel(data, guild) { - let already = this.get('channels', data.id); - let channel; - if (data.is_private) { - channel = new DMChannel(this.client, data); - }else { - guild = guild || this.get('guilds', data.guild_id); - if (guild) { - if (data.type === 'text') { - channel = new TextChannel(guild, data); - guild.store.add('channels', channel); - }else if (data.type === 'voice') { - channel = new VoiceChannel(guild, data); - guild.store.add('channels', channel); - } - } - } + newChannel(data, $guild) { + let guild = $guild; + const already = this.get('channels', data.id); + let channel; + if (data.is_private) { + channel = new DMChannel(this.client, data); + } else { + guild = guild || this.get('guilds', data.guild_id); + if (guild) { + if (data.type === 'text') { + channel = new TextChannel(guild, data); + guild.store.add('channels', channel); + } else if (data.type === 'voice') { + channel = new VoiceChannel(guild, data); + guild.store.add('channels', channel); + } + } + } - if (channel) { - if (this.pastReady && !already) { - this.client.emit(Constants.Events.CHANNEL_CREATE, channel); - } + if (channel) { + if (this.pastReady && !already) { + this.client.emit(Constants.Events.CHANNEL_CREATE, channel); + } - return this.add('channels', channel); - } - } + return this.add('channels', channel); + } + return null; + } - KillGuild(guild) { - let already = this.get('guilds', guilds.id); - this.remove('guilds', guild); - if (already && this.pastReady) { - this.client.emit(Constants.Events.GUILD_DELETE, guild); - } - } + killGuild(guild) { + const already = this.get('guilds', guild.id); + this.remove('guilds', guild); + if (already && this.pastReady) { + this.client.emit(Constants.Events.GUILD_DELETE, guild); + } + } - KillUser(user) { - this.remove('users', user); - } + killUser(user) { + this.remove('users', user); + } - KillChannel(channel) { - this.remove('channels', channel); - if (channel instanceof ServerChannel) { - channel.guild.store.remove('channels', channel); - } - } + killChannel(channel) { + this.remove('channels', channel); + if (channel instanceof ServerChannel) { + channel.guild.store.remove('channels', channel); + } + } - UpdateGuild(currentGuild, newData) { - let oldGuild = CloneObject(currentGuild); - currentGuild.setup(newData); - if (this.pastReady) { - this.client.emit(Constants.Events.GUILD_UPDATE, oldGuild, currentGuild); - } - } + updateGuild(currentGuild, newData) { + const oldGuild = cloneObject(currentGuild); + currentGuild.setup(newData); + if (this.pastReady) { + this.client.emit(Constants.Events.GUILD_UPDATE, oldGuild, currentGuild); + } + } - UpdateChannel(currentChannel, newData) { - let oldChannel = CloneObject(currentChannel); - currentChannel.setup(newData); - } + updateChannel(currentChannel, newData) { + currentChannel.setup(newData); + } } module.exports = ClientDataStore; diff --git a/src/structures/datastore/GuildDataStore.js b/src/structures/datastore/GuildDataStore.js index 68f8fa5d7..bea556765 100644 --- a/src/structures/datastore/GuildDataStore.js +++ b/src/structures/datastore/GuildDataStore.js @@ -1,14 +1,12 @@ -'use strict'; - const AbstractDataStore = require('./AbstractDataStore'); -class GuildDataStore extends AbstractDataStore{ - constructor() { - super(); +class GuildDataStore extends AbstractDataStore { + constructor() { + super(); - this.register('members'); - this.register('channels'); - } + this.register('members'); + this.register('channels'); + } } module.exports = GuildDataStore; diff --git a/src/structures/datastore/TextChannelDataStore.js b/src/structures/datastore/TextChannelDataStore.js index 08316431b..1cf54a825 100644 --- a/src/structures/datastore/TextChannelDataStore.js +++ b/src/structures/datastore/TextChannelDataStore.js @@ -1,12 +1,10 @@ -'use strict'; - const AbstractDataStore = require('./AbstractDataStore'); -class TextChannelDataStore extends AbstractDataStore{ - constructor() { - super(); - this.register('messages'); - } +class TextChannelDataStore extends AbstractDataStore { + constructor() { + super(); + this.register('messages'); + } } module.exports = TextChannelDataStore; diff --git a/src/structures/datastore/VoiceChannelDataStore.js b/src/structures/datastore/VoiceChannelDataStore.js index 88b9da7bb..9705d5c77 100644 --- a/src/structures/datastore/VoiceChannelDataStore.js +++ b/src/structures/datastore/VoiceChannelDataStore.js @@ -1,12 +1,10 @@ -'use strict'; - const AbstractDataStore = require('./AbstractDataStore'); -class VoiceChannelDataStore extends AbstractDataStore{ - constructor() { - super(); - this.register('members'); - } +class VoiceChannelDataStore extends AbstractDataStore { + constructor() { + super(); + this.register('members'); + } } module.exports = VoiceChannelDataStore; diff --git a/src/structures/datastore/WebSocketManagerDataStore.js b/src/structures/datastore/WebSocketManagerDataStore.js index a63d41369..82f8d94c4 100644 --- a/src/structures/datastore/WebSocketManagerDataStore.js +++ b/src/structures/datastore/WebSocketManagerDataStore.js @@ -1,14 +1,12 @@ -'use strict'; - const AbstractDataStore = require('./AbstractDataStore'); -class WebSocketManagerDataStore extends AbstractDataStore{ - constructor() { - super(); - this.sessionID = null; - this.sequence = -1; - this.gateway = null; - } +class WebSocketManagerDataStore extends AbstractDataStore { + constructor() { + super(); + this.sessionID = null; + this.sequence = -1; + this.gateway = null; + } } module.exports = WebSocketManagerDataStore; diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index a76a855a5..1eb44ca90 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -1,15 +1,12 @@ -'use strict'; - -function sendMessage(content, options) { - options = options || {}; - return this.client.rest.methods.SendMessage(this, content, options.tts); +function sendMessage(content, options = {}) { + return this.client.rest.methods.sendMessage(this, content, options.tts); } -function sendTTSMessage(content, options) { - options = options || {}; - return this.client.rest.methods.SendMessage(this, content, true); +function sendTTSMessage(content) { + return this.client.rest.methods.sendMessage(this, content, true); } exports.applyToClass = structure => { - structure.prototype.sendMessage = sendMessage; + structure.prototype.sendMessage = sendMessage; + structure.prototype.sendTTSMessage = sendTTSMessage; }; diff --git a/src/util/CloneObject.js b/src/util/CloneObject.js index 158f9d189..726712fb6 100644 --- a/src/util/CloneObject.js +++ b/src/util/CloneObject.js @@ -1,7 +1,6 @@ -'use strict'; -module.exports = function CloneObject(obj) { - var cloned = Object.create(obj); - Object.assign(cloned, obj); +module.exports = function cloneObject(obj) { + const cloned = Object.create(obj); + Object.assign(cloned, obj); - return cloned; + return cloned; }; diff --git a/src/util/Constants.js b/src/util/Constants.js index daf082231..f958c3a7f 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -1,184 +1,182 @@ -'use strict'; - -const DefaultOptions = exports.DefaultOptions = { - ws: { - large_threshold: 250, - compress: true, - properties: { - $os: process ? process.platform : 'discord.js', - $browser: 'discord.js', - $device: 'discord.js', - $referrer: '', - $referring_domain: '', - }, - }, - protocol_version: 4, - max_message_cache: 200, - rest_ws_bridge_timeout: 5000, +exports.DefaultOptions = { + ws: { + large_threshold: 250, + compress: true, + properties: { + $os: process ? process.platform : 'discord.js', + $browser: 'discord.js', + $device: 'discord.js', + $referrer: '', + $referring_domain: '', + }, + }, + protocol_version: 4, + max_message_cache: 200, + rest_ws_bridge_timeout: 5000, }; -const Status = exports.Status = { - READY: 0, - CONNECTING: 1, - RECONNECTING: 2, - IDLE: 3, +exports.Status = { + READY: 0, + CONNECTING: 1, + RECONNECTING: 2, + IDLE: 3, }; -const Package = exports.Package = require('../../package.json'); +exports.Package = require('../../package.json'); -const Errors = exports.Errors = { - NO_TOKEN: new Error('request to use token, but token was unavailable to the client'), - NO_BOT_ACCOUNT: new Error('you should ideally be using a bot account!'), - BAD_WS_MESSAGE: new Error('a bad message was received from the websocket - bad compression or not json'), - TOOK_TOO_LONG: new Error('something took too long to do'), - NOT_A_PERMISSION: new Error('that is not a valid permission number'), +exports.Errors = { + NO_TOKEN: new Error('request to use token, but token was unavailable to the client'), + NO_BOT_ACCOUNT: new Error('you should ideally be using a bot account!'), + BAD_WS_MESSAGE: new Error('a bad message was received from the websocket - bad compression or not json'), + TOOK_TOO_LONG: new Error('something took too long to do'), + NOT_A_PERMISSION: new Error('that is not a valid permission number'), }; const API = 'https://discordapp.com/api'; const Endpoints = exports.Endpoints = { - // general endpoints - LOGIN: `${API}/auth/login`, - LOGOUT: `${API}/auth/logout`, - ME: `${API}/users/@me`, - ME_GUILD: (guildID) => `${Endpoints.ME}/guilds/${guildID}`, - GATEWAY: `${API}/gateway`, - USER_CHANNELS: (userID) => `${API}/users/${userID}/channels`, - AVATAR: (userID, avatar) => `${API}/users/${userID}/avatars/${avatar}.jpg`, - INVITE: (id) => `${API}/invite/${id}`, + // general endpoints + login: `${API}/auth/login`, + logout: `${API}/auth/logout`, + me: `${API}/users/@me`, + meGuild: (guildID) => `${Endpoints.me}/guilds/${guildID}`, + gateway: `${API}/gateway`, + userChannels: (userID) => `${API}/users/${userID}/channels`, + avatar: (userID, avatar) => `${API}/users/${userID}/avatars/${avatar}.jpg`, + invite: (id) => `${API}/invite/${id}`, - // guilds - GUILDS: `${API}/guilds`, - GUILD: (guildID) => `${Endpoints.GUILDS}/${guildID}`, - GUILD_ICON: (guildID, hash) => `${Endpoints.GUILD(guildID)}/icons/${hash}.jpg`, - GUILD_PRUNE: (guildID) => `${Endpoints.GUILD(guildID)}/prune`, - GUILD_EMBED: (guildID) => `${Endpoints.GUILD(guildID)}/embed`, - GUILD_INVITES: (guildID) => `${Endpoints.GUILD(guildID)}/invites`, - GUILD_ROLES: (guildID) => `${Endpoints.GUILD(guildID)}/roles`, - GUILD_ROLE: (guildID, roleID) => `${Endpoints.GUILD_ROLES(guildID)}/${roleID}`, - GUILD_BANS: (guildID) => `${Endpoints.GUILD(guildID)}/bans`, - GUILD_INTEGRATIONS: (guildID) => `${Endpoints.GUILD(guildID)}/integrations`, - GUILD_MEMBERS: (guildID) => `${Endpoints.GUILD(guildID)}/members`, - GUILD_MEMBER: (guildID, memberID) => `${Endpoints.GUILD_MEMBERS(guildID)}/${memberID}`, - GUILD_CHANNELS: (guildID) => `${Endpoints.GUILD(guildID)}/channels`, + // guilds + guilds: `${API}/guilds`, + guild: (guildID) => `${Endpoints.guilds}/${guildID}`, + guildIcon: (guildID, hash) => `${Endpoints.guild(guildID)}/icons/${hash}.jpg`, + guildPrune: (guildID) => `${Endpoints.guild(guildID)}/prune`, + guildEmbed: (guildID) => `${Endpoints.guild(guildID)}/embed`, + guildInvites: (guildID) => `${Endpoints.guild(guildID)}/invites`, + guildRoles: (guildID) => `${Endpoints.guild(guildID)}/roles`, + guildRole: (guildID, roleID) => `${Endpoints.guildRoles(guildID)}/${roleID}`, + guildBans: (guildID) => `${Endpoints.guild(guildID)}/bans`, + guildIntegrations: (guildID) => `${Endpoints.guild(guildID)}/integrations`, + guildMembers: (guildID) => `${Endpoints.guild(guildID)}/members`, + guildMember: (guildID, memberID) => `${Endpoints.guildMembers(guildID)}/${memberID}`, + guildChannels: (guildID) => `${Endpoints.guild(guildID)}/channels`, - // channels - CHANNELS: `${API}/channels`, - CHANNEL: (channelID) => `${Endpoints.CHANNELS}/${channelID}`, - CHANNEL_MESSAGES: (channelID) => `${Endpoints.CHANNEL(channelID)}/messages`, - CHANNEL_INVITES: (channelID) => `${Endpoints.CHANNEL(channelID)}/invites`, - CHANNEL_TYPING: (channelID) => `${Endpoints.CHANNEL(channelID)}/typing`, - CHANNEL_PERMISSIONS: (channelID) => `${Endpoints.CHANNEL(channelID)}/permissions`, - CHANNEL_MESSAGE: (channelID, messageID) => `${Endpoints.CHANNEL_MESSAGES(channelID)}/${messageID}`, + // channels + channels: `${API}/channels`, + channel: (channelID) => `${Endpoints.channels}/${channelID}`, + channelMessages: (channelID) => `${Endpoints.channel(channelID)}/messages`, + channelInvites: (channelID) => `${Endpoints.channel(channelID)}/invites`, + channelTyping: (channelID) => `${Endpoints.channel(channelID)}/typing`, + channelPermissions: (channelID) => `${Endpoints.channel(channelID)}/permissions`, + channelMessage: (channelID, messageID) => `${Endpoints.channelMessage(channelID)}/${messageID}`, }; -const OPCodes = exports.OPCodes = { - DISPATCH: 0, - HEARTBEAT: 1, - IDENTIFY: 2, - STATUS_UPDATE: 3, - VOICE_STATE_UPDATE: 4, - VOICE_GUILD_PING: 5, - RESUME: 6, - RECONNECT: 7, - REQUEST_GUILD_MEMBERS: 8, - INVALID_SESSION: 9, +exports.OPCodes = { + DISPATCH: 0, + HEARTBEAT: 1, + IDENTIFY: 2, + STATUS_UPDATE: 3, + VOICE_STATE_UPDATE: 4, + VOICE_GUILD_PING: 5, + RESUME: 6, + RECONNECT: 7, + REQUEST_GUILD_MEMBERS: 8, + INVALID_SESSION: 9, }; -const Events = exports.Events = { - READY: 'ready', - GUILD_CREATE: 'guildCreate', - GUILD_DELETE: 'guildDelete', - GUILD_UNAVAILABLE: 'guildUnavailable', - GUILD_AVAILABLE: 'guildAvailable', - GUILD_UPDATE: 'guildUpdate', - GUILD_BAN_ADD: 'guildBanAdd', - GUILD_BAN_REMOVE: 'guildBanRemove', - GUILD_MEMBER_ADD: 'guildMemberAdd', - GUILD_MEMBER_REMOVE: 'guildMemberRemove', - GUILD_MEMBER_ROLES_UPDATE: 'guildMemberRolesUpdate', - GUILD_ROLE_CREATE: 'guildRoleCreate', - GUILD_ROLE_DELETE: 'guildRoleDelete', - GUILD_ROLE_UPDATE: 'guildRoleUpdate', - GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable', - CHANNEL_CREATE: 'channelCreate', - CHANNEL_DELETE: 'channelDelete', - CHANNEL_UPDATE: 'channelUpdate', - PRESENCE_UPDATE: 'presenceUpdate', - USER_UPDATE: 'userUpdate', - VOICE_STATE_UPDATE: 'voiceStateUpdate', - TYPING_START: 'typingStart', - TYPING_STOP: 'typingStop', - WARN: 'warn', - GUILD_MEMBERS_CHUNK: 'guildMembersChunk', - MESSAGE_CREATE: 'message', - MESSAGE_DELETE: 'messageDelete', - MESSAGE_UPDATE: 'messageUpdate', +exports.Events = { + READY: 'ready', + GUILD_CREATE: 'guildCreate', + GUILD_DELETE: 'guildDelete', + GUILD_UNAVAILABLE: 'guildUnavailable', + GUILD_AVAILABLE: 'guildAvailable', + GUILD_UPDATE: 'guildUpdate', + GUILD_BAN_ADD: 'guildBanAdd', + GUILD_BAN_REMOVE: 'guildBanRemove', + GUILD_MEMBER_ADD: 'guildMemberAdd', + GUILD_MEMBER_REMOVE: 'guildMemberRemove', + GUILD_MEMBER_ROLES_UPDATE: 'guildMemberRolesUpdate', + GUILD_ROLE_CREATE: 'guildRoleCreate', + GUILD_ROLE_DELETE: 'guildRoleDelete', + GUILD_ROLE_UPDATE: 'guildRoleUpdate', + GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable', + CHANNEL_CREATE: 'channelCreate', + CHANNEL_DELETE: 'channelDelete', + CHANNEL_UPDATE: 'channelUpdate', + PRESENCE_UPDATE: 'presenceUpdate', + USER_UPDATE: 'userUpdate', + VOICE_STATE_UPDATE: 'voiceStateUpdate', + TYPING_START: 'typingStart', + TYPING_STOP: 'typingStop', + WARN: 'warn', + GUILD_MEMBERS_CHUNK: 'guildMembersChunk', + MESSAGE_CREATE: 'message', + MESSAGE_DELETE: 'messageDelete', + MESSAGE_UPDATE: 'messageUpdate', }; -const WSEvents = exports.WSEvents = { - CHANNEL_CREATE: 'CHANNEL_CREATE', - CHANNEL_DELETE: 'CHANNEL_DELETE', - CHANNEL_UPDATE: 'CHANNEL_UPDATE', - MESSAGE_CREATE: 'MESSAGE_CREATE', - MESSAGE_DELETE: 'MESSAGE_DELETE', - MESSAGE_UPDATE: 'MESSAGE_UPDATE', - PRESENCE_UPDATE: 'PRESENCE_UPDATE', - READY: 'READY', - GUILD_BAN_ADD: 'GUILD_BAN_ADD', - GUILD_BAN_REMOVE: 'GUILD_BAN_REMOVE', - GUILD_CREATE: 'GUILD_CREATE', - GUILD_DELETE: 'GUILD_DELETE', - GUILD_MEMBER_ADD: 'GUILD_MEMBER_ADD', - GUILD_MEMBER_REMOVE: 'GUILD_MEMBER_REMOVE', - GUILD_MEMBER_UPDATE: 'GUILD_MEMBER_UPDATE', - GUILD_MEMBERS_CHUNK: 'GUILD_MEMBERS_CHUNK', - GUILD_ROLE_CREATE: 'GUILD_ROLE_CREATE', - GUILD_ROLE_DELETE: 'GUILD_ROLE_DELETE', - GUILD_ROLE_UPDATE: 'GUILD_ROLE_UPDATE', - GUILD_UPDATE: 'GUILD_UPDATE', - TYPING_START: 'TYPING_START', - USER_UPDATE: 'USER_UPDATE', - VOICE_STATE_UPDATE: 'VOICE_STATE_UPDATE', - FRIEND_ADD: 'RELATIONSHIP_ADD', - FRIEND_REMOVE: 'RELATIONSHIP_REMOVE', +exports.WSEvents = { + CHANNEL_CREATE: 'CHANNEL_CREATE', + CHANNEL_DELETE: 'CHANNEL_DELETE', + CHANNEL_UPDATE: 'CHANNEL_UPDATE', + MESSAGE_CREATE: 'MESSAGE_CREATE', + MESSAGE_DELETE: 'MESSAGE_DELETE', + MESSAGE_UPDATE: 'MESSAGE_UPDATE', + PRESENCE_UPDATE: 'PRESENCE_UPDATE', + READY: 'READY', + GUILD_BAN_ADD: 'GUILD_BAN_ADD', + GUILD_BAN_REMOVE: 'GUILD_BAN_REMOVE', + GUILD_CREATE: 'GUILD_CREATE', + GUILD_DELETE: 'GUILD_DELETE', + GUILD_MEMBER_ADD: 'GUILD_MEMBER_ADD', + GUILD_MEMBER_REMOVE: 'GUILD_MEMBER_REMOVE', + GUILD_MEMBER_UPDATE: 'GUILD_MEMBER_UPDATE', + GUILD_MEMBERS_CHUNK: 'GUILD_MEMBERS_CHUNK', + GUILD_ROLE_CREATE: 'GUILD_ROLE_CREATE', + GUILD_ROLE_DELETE: 'GUILD_ROLE_DELETE', + GUILD_ROLE_UPDATE: 'GUILD_ROLE_UPDATE', + GUILD_UPDATE: 'GUILD_UPDATE', + TYPING_START: 'TYPING_START', + USER_UPDATE: 'USER_UPDATE', + VOICE_STATE_UPDATE: 'VOICE_STATE_UPDATE', + FRIEND_ADD: 'RELATIONSHIP_ADD', + FRIEND_REMOVE: 'RELATIONSHIP_REMOVE', }; const PermissionFlags = exports.PermissionFlags = { - CREATE_INSTANT_INVITE: 1 << 0, - KICK_MEMBERS: 1 << 1, - BAN_MEMBERS: 1 << 2, - ADMINISTRATOR: 1 << 3, - MANAGE_CHANNELS: 1 << 4, - MANAGE_GUILD: 1 << 5, + CREATE_INSTANT_INVITE: 1 << 0, + KICK_MEMBERS: 1 << 1, + BAN_MEMBERS: 1 << 2, + ADMINISTRATOR: 1 << 3, + MANAGE_CHANNELS: 1 << 4, + MANAGE_GUILD: 1 << 5, - READ_MESSAGES: 1 << 10, - SEND_MESSAGES: 1 << 11, - SEND_TTS_MESSAGES: 1 << 12, - MANAGE_MESSAGES: 1 << 13, - EMBED_LINKS: 1 << 14, - ATTACH_FILES: 1 << 15, - READ_MESSAGE_HISTORY: 1 << 16, - MENTION_EVERYONE: 1 << 17, + READ_MESSAGES: 1 << 10, + SEND_MESSAGES: 1 << 11, + SEND_TTS_MESSAGES: 1 << 12, + MANAGE_MESSAGES: 1 << 13, + EMBED_LINKS: 1 << 14, + ATTACH_FILES: 1 << 15, + READ_MESSAGE_HISTORY: 1 << 16, + MENTION_EVERYONE: 1 << 17, - CONNECT: 1 << 20, - SPEAK: 1 << 21, - MUTE_MEMBERS: 1 << 22, - DEAFEN_MEMBERS: 1 << 23, - MOVE_MEMBERS: 1 << 24, - USE_VAD: 1 << 25, + CONNECT: 1 << 20, + SPEAK: 1 << 21, + MUTE_MEMBERS: 1 << 22, + DEAFEN_MEMBERS: 1 << 23, + MOVE_MEMBERS: 1 << 24, + USE_VAD: 1 << 25, - CHANGE_NICKNAME: 1 << 26, - MANAGE_NICKNAMES: 1 << 27, - MANAGE_ROLES_OR_PERMISSIONS: 1 << 28, + CHANGE_NICKNAME: 1 << 26, + MANAGE_NICKNAMES: 1 << 27, + MANAGE_ROLES_OR_PERMISSIONS: 1 << 28, }; let _ALL_PERMISSIONS = 0; -for (let key in PermissionFlags) { - _ALL_PERMISSIONS |= PermissionFlags[key]; +for (const key in PermissionFlags) { + _ALL_PERMISSIONS |= PermissionFlags[key]; } -const ALL_PERMISSIONS = exports.ALL_PERMISSIONS = _ALL_PERMISSIONS; +exports.ALL_PERMISSIONS = _ALL_PERMISSIONS; -const DEFAULT_PERMISSIONS = exports.DEFAULT_PERMISSIONS = 36953089; +exports.DEFAULT_PERMISSIONS = 36953089; diff --git a/src/util/MergeDefault.js b/src/util/MergeDefault.js index 3da11d278..d07044cdc 100644 --- a/src/util/MergeDefault.js +++ b/src/util/MergeDefault.js @@ -1,19 +1,17 @@ -'use strict'; - module.exports = function merge(def, given) { - if (!given) { - return def; - } + if (!given) { + return def; + } - given = given || {}; + given = given || {}; - for (var key in def) { - if (!given.hasOwnProperty(key)) { - given[key] = def[key]; - } else if (given[key] === Object(given[key])) { - given[key] = merge(def[key], given[key]); - } - } + for (const key in def) { + if (!{}.hasOwnProperty.call(given, key)) { + given[key] = def[key]; + } else if (given[key] === Object(given[key])) { + given[key] = merge(def[key], given[key]); + } + } - return given; + return given; }; diff --git a/test/random.js b/test/random.js index a1de4025f..54516b2be 100644 --- a/test/random.js +++ b/test/random.js @@ -3,172 +3,172 @@ const Discord = require('../'); const request = require('superagent'); -let client = new Discord.Client(); +const client = new Discord.Client(); client.login(require('./auth.json').token).then(token => console.log('logged in with token ' + token)).catch(console.log); client.on('ready', () => { - console.log('ready!'); + console.log('ready!'); }); client.on('guildCreate', (guild) => { - console.log(guild); + console.log(guild); }); client.on('guildDelete', (guild) => { - console.log('guilddel', guild.name); + console.log('guilddel', guild.name); }); client.on('guildUpdate', (old, guild) => { - console.log('guildupdate', old.name, guild.name); + console.log('guildupdate', old.name, guild.name); }); client.on('channelCreate', channel => { - // console.log(channel); + // console.log(channel); }); client.on('channelDelete', channel => { - console.log('channDel', channel.name); + console.log('channDel', channel.name); }); client.on('channelUpdate', (old, chan) => { - console.log('chan update', old.name, chan.name); + console.log('chan update', old.name, chan.name); }); client.on('guildMemberAdd', (guild, user) => { - console.log('new guild member', user.user.username, 'in', guild.name); + console.log('new guild member', user.user.username, 'in', guild.name); }); client.on('guildMemberRemove', (guild, user) => { - console.log('dead guild member', user.user.username, 'in', guild.name); + console.log('dead guild member', user.user.username, 'in', guild.name); }); client.on('guildRoleCreate', (guild, role) => { - console.log('new role', role.name, 'in', guild.name); - role.edit({ - permissions: ['DEAFEN_MEMBERS'], - name: 'deafen' - }).then(role2 => { - console.log('role replace from ' + role.name + ' to ' + role2.name); - }).catch(console.log) + console.log('new role', role.name, 'in', guild.name); + role.edit({ + permissions: ['DEAFEN_MEMBERS'], + name: 'deafen', + }).then(role2 => { + console.log('role replace from ' + role.name + ' to ' + role2.name); + }).catch(console.log); }); client.on('guildRoleDelete', (guild, role) => { - console.log('dead role', role.name, 'in', guild.name); + console.log('dead role', role.name, 'in', guild.name); }); client.on('guildRoleUpdate', (guild, old, newRole) => { - console.log('updated role', old.name, 'to', newRole.name, 'in', guild.name); + console.log('updated role', old.name, 'to', newRole.name, 'in', guild.name); }); client.on('presenceUpdate', (oldUser, newUser) => { - // console.log('presence from', oldUser.username, 'to', newUser.username); + // console.log('presence from', oldUser.username, 'to', newUser.username); }); client.on('voiceStateUpdate', (oldMember, newMember) => { - console.log('voiceState', oldMember.user.username, oldMember.voiceChannel + '', newMember.voiceChannel + ''); + console.log('voiceState', oldMember.user.username, oldMember.voiceChannel + '', newMember.voiceChannel + ''); }); client.on('typingStart.', (channel, user) => { - if (user.username === 'hydrabolt') - console.log(user.username, 'started typing in', channel.name); + if (user.username === 'hydrabolt') + console.log(user.username, 'started typing in', channel.name); }); client.on('typingStop.', (channel, user, data) => { - if (user.username === 'hydrabolt') - console.log(user.username, 'stopped typing in', channel.name, 'after', data.elapsedTime + 'ms'); + if (user.username === 'hydrabolt') + console.log(user.username, 'stopped typing in', channel.name, 'after', data.elapsedTime + 'ms'); }); client.on('message', message => { - if (true) { - if (message.content === 'makechann') { - if (message.channel.guild) { - message.channel.guild.createChannel('hi', 'text').then(console.log); - } - } + if (true) { + if (message.content === 'makechann') { + if (message.channel.guild) { + message.channel.guild.createChannel('hi', 'text').then(console.log); + } + } - if (message.content === 'myperms?') { - message.channel.sendMessage('Your permissions are:\n' + - JSON.stringify(message.channel.permissionsFor(message.author).serialize(), null, 4)); - } + if (message.content === 'myperms?') { + message.channel.sendMessage('Your permissions are:\n' + + JSON.stringify(message.channel.permissionsFor(message.author).serialize(), null, 4)); + } - if (message.content === 'delchann') { - message.channel.delete().then(chan => console.log('selfDelChann', chan.name)); - } + if (message.content === 'delchann') { + message.channel.delete().then(chan => console.log('selfDelChann', chan.name)); + } - if (message.content.startsWith('setname')) { - message.channel.setName(message.content.substr(8)); - } + if (message.content.startsWith('setname')) { + message.channel.setName(message.content.substr(8)); + } - if (message.content.startsWith('botname')) { - client.user.setUsername(message.content.substr(8)); - } + if (message.content.startsWith('botname')) { + client.user.setUsername(message.content.substr(8)); + } - if (message.content.startsWith('botavatar')) { - request - .get('url') - .end((err, res) => { - client.user.setAvatar(res.body).catch(console.log) - .then(user => message.channel.sendMessage('Done!')); - }); - } + if (message.content.startsWith('botavatar')) { + request + .get('url') + .end((err, res) => { + client.user.setAvatar(res.body).catch(console.log) + .then(user => message.channel.sendMessage('Done!')); + }); + } - if (message.content.startsWith('gn')) { - message.guild.setName(message.content.substr(3)) - .then(guild => console.log('guild updated to', guild.name)) - .catch(console.log); - } + if (message.content.startsWith('gn')) { + message.guild.setName(message.content.substr(3)) + .then(guild => console.log('guild updated to', guild.name)) + .catch(console.log); + } - if (message.content === 'leave') { - message.guild.leave().then(guild => console.log('left guild', guild.name)).catch(console.log); - } + if (message.content === 'leave') { + message.guild.leave().then(guild => console.log('left guild', guild.name)).catch(console.log); + } - if (message.content === 'stats') { - let m = ''; - m += `I am aware of ${message.guild.channels.length} channels\n`; - m += `I am aware of ${message.guild.members.length} members`; - message.channel.sendMessage(m); - } + if (message.content === 'stats') { + let m = ''; + m += `I am aware of ${message.guild.channels.length} channels\n`; + m += `I am aware of ${message.guild.members.length} members`; + message.channel.sendMessage(m); + } - if (message.content === 'messageme!') { - message.author.sendMessage('oh, hi there!').catch(e => console.log(e.stack)); - } + if (message.content === 'messageme!') { + message.author.sendMessage('oh, hi there!').catch(e => console.log(e.stack)); + } - if (message.content === 'don\'t dm me') { - message.author.deleteDM(); - } + if (message.content === 'don\'t dm me') { + message.author.deleteDM(); + } - if (message.content.startsWith('kick')) { - message.guild.member(message.mentions[0]).kick().then(member => { - console.log(member); - message.channel.sendMessage('Kicked!' + member.user.username); - }).catch(console.log); - } + if (message.content.startsWith('kick')) { + message.guild.member(message.mentions[0]).kick().then(member => { + console.log(member); + message.channel.sendMessage('Kicked!' + member.user.username); + }).catch(console.log); + } - if (message.content === 'makerole') { - message.guild.createRole().then(role => { - message.channel.sendMessage(`Made role ${role.name}`); - }).catch(console.log); - } - } + if (message.content === 'makerole') { + message.guild.createRole().then(role => { + message.channel.sendMessage(`Made role ${role.name}`); + }).catch(console.log); + } + } }); function nameLoop(user) { - // user.setUsername(user.username + 'a').then(nameLoop).catch(console.log); + // user.setUsername(user.username + 'a').then(nameLoop).catch(console.log); } function chanLoop(channel) { - channel.setName(channel.name + 'a').then(chanLoop).catch(console.log); + channel.setName(channel.name + 'a').then(chanLoop).catch(console.log); } client.on('messageDelete', message => { - console.log('Message deleted by', message.author.username); + console.log('Message deleted by', message.author.username); }); client.on('messageUpdate', (old, message) => { - if (message.author.username === 'hydrabolt') - console.log('Message updated from', old.content, 'to', message.content); + if (message.author.username === 'hydrabolt') + console.log('Message updated from', old.content, 'to', message.content); }); client.on('message', message => { - if (message.content === '?perms?') { - console.log(message.author.username, 'asked for perms in', message.channel.name, ':'); - console.log(message.channel.permissionsFor(message.author).serialize()); - } + if (message.content === '?perms?') { + console.log(message.author.username, 'asked for perms in', message.channel.name, ':'); + console.log(message.channel.permissionsFor(message.author).serialize()); + } }); From f2ccef1ce57584ee737a1f959a8a80bf7fc5d9d1 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 13 Aug 2016 14:45:22 +0100 Subject: [PATCH 044/324] remove console.log in rest --- src/client/rest/RESTManager.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/client/rest/RESTManager.js b/src/client/rest/RESTManager.js index 768367219..9db8403b7 100644 --- a/src/client/rest/RESTManager.js +++ b/src/client/rest/RESTManager.js @@ -56,7 +56,6 @@ class RESTManager { /* file is {file, name} */ - console.log(url); const apiRequest = request[method](url); const endpoint = url.replace(/\/[0-9]+/g, '/:id'); From 50af835774f2ee2eac3b3da45278f5aace8a8ebb Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 13 Aug 2016 14:53:04 +0100 Subject: [PATCH 045/324] Move to v6 protocol --- src/client/websocket/WebSocketManager.js | 1 - src/util/Constants.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 0b30d627d..4ac300004 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -91,7 +91,6 @@ class WebSocketManager { checkIfReady() { if (this.status !== Constants.Status.READY) { let unavailableCount = 0; - for (const guildID in this.client.store.data.guilds) { unavailableCount += this.client.store.data.guilds[guildID].available ? 0 : 1; } diff --git a/src/util/Constants.js b/src/util/Constants.js index f958c3a7f..0625118e1 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -10,7 +10,7 @@ exports.DefaultOptions = { $referring_domain: '', }, }, - protocol_version: 4, + protocol_version: 6, max_message_cache: 200, rest_ws_bridge_timeout: 5000, }; From c02d7808c1e8b9b65242a3754f6cf58e9c2dd9bd Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 13 Aug 2016 16:01:01 +0100 Subject: [PATCH 046/324] =?UTF-8?q?go=20back=20to=20protocol=205=20because?= =?UTF-8?q?=20the=20docs=20aren't=20ready=20for=20v6=20=C2=AF\=5F(?= =?UTF-8?q?=E3=83=84)=5F/=C2=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/util/Constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Constants.js b/src/util/Constants.js index 0625118e1..69780c241 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -10,7 +10,7 @@ exports.DefaultOptions = { $referring_domain: '', }, }, - protocol_version: 6, + protocol_version: 5, max_message_cache: 200, rest_ws_bridge_timeout: 5000, }; From a2f868051404f42650a000c77cb20f8c55f0d839 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 13 Aug 2016 16:23:24 +0100 Subject: [PATCH 047/324] Fix protocol versions --- src/client/rest/RESTMethods.js | 5 ++++- src/client/websocket/WebSocketManager.js | 9 ++++++--- src/client/websocket/packets/handlers/Ready.js | 1 - 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 9eff9d3d1..abb5390da 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -30,7 +30,10 @@ class RESTMethods { getGateway() { return new Promise((resolve, reject) => { this.rest.makeRequest('get', Constants.Endpoints.gateway, true) - .then(res => resolve(res.url)) + .then(res => { + this.rest.client.store.gateway = `${res.url}/?encoding=json&v=${this.rest.client.options.protocol_version}`; + resolve(this.rest.client.store.gateway); + }) .catch(reject); }); } diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 4ac300004..08df59b46 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -16,7 +16,6 @@ class WebSocketManager { connect(gateway) { this.status = Constants.Status.CONNECTING; - this.store.gateway = `${gateway}/?v=${this.client.options.protocol_version}`; this.ws = new WebSocket(gateway); this.ws.onopen = () => this.eventOpen(); this.ws.onclose = () => this.eventClose(); @@ -81,10 +80,14 @@ class WebSocketManager { return this.eventError(Constants.Errors.BAD_WS_MESSAGE); } + if (packet.op === 10) { + this.client.manager.setupKeepAlive(packet.d.heartbeat_interval); + } + return this.packetManager.handle(packet); } - EventError() { + eventError() { this.tryReconnect(); } @@ -108,7 +111,7 @@ class WebSocketManager { this.ws.close(); this.packetManager.handleQueue(); this.client.emit(Constants.Events.RECONNECTING); - this.connect(this.store.gateway); + this.connect(this.client.store.gateway); } } diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index e37d0a758..f49a8aa63 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -8,7 +8,6 @@ class ReadyHandler extends AbstractHandler { handle(packet) { const data = packet.d; const client = this.packetManager.client; - client.manager.setupKeepAlive(data.heartbeat_interval); client.store.user = client.store.add('users', new ClientUser(client, data.user)); From 75e3ee86fbbc23910f84594909e4a5c7ba10e88d Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 13 Aug 2016 16:29:19 +0100 Subject: [PATCH 048/324] Add userLimit param to voice channel --- src/structures/VoiceChannel.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index 9c643820d..4a4f6c253 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -10,6 +10,7 @@ class VoiceChannel extends ServerChannel { setup(data) { super.setup(data); this.bitrate = data.bitrate; + this.userLimit = data.user_limit; } } From 7ada70f856debf03be3ae30603c868260f649a00 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 13 Aug 2016 16:41:06 +0100 Subject: [PATCH 049/324] update back to v6 (again) and start work patching the lib --- src/structures/datastore/ClientDataStore.js | 6 +++--- src/util/Constants.js | 9 ++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/structures/datastore/ClientDataStore.js b/src/structures/datastore/ClientDataStore.js index 4d0dd0a87..b62e97af5 100644 --- a/src/structures/datastore/ClientDataStore.js +++ b/src/structures/datastore/ClientDataStore.js @@ -46,15 +46,15 @@ class ClientDataStore extends AbstractDataStore { let guild = $guild; const already = this.get('channels', data.id); let channel; - if (data.is_private) { + if (data.type === Constants.ChannelTypes.DM) { channel = new DMChannel(this.client, data); } else { guild = guild || this.get('guilds', data.guild_id); if (guild) { - if (data.type === 'text') { + if (data.type === Constants.ChannelTypes.text) { channel = new TextChannel(guild, data); guild.store.add('channels', channel); - } else if (data.type === 'voice') { + } else if (data.type === Constants.ChannelTypes.voice) { channel = new VoiceChannel(guild, data); guild.store.add('channels', channel); } diff --git a/src/util/Constants.js b/src/util/Constants.js index 69780c241..bfaf84e57 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -10,7 +10,7 @@ exports.DefaultOptions = { $referring_domain: '', }, }, - protocol_version: 5, + protocol_version: 6, max_message_cache: 200, rest_ws_bridge_timeout: 5000, }; @@ -22,6 +22,13 @@ exports.Status = { IDLE: 3, }; +exports.ChannelTypes = { + text: 0, + DM: 1, + voice: 2, + groupDM: 3, +}; + exports.Package = require('../../package.json'); exports.Errors = { From b2950b299735eb42c1911ba930176f09e7bf6d68 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 13 Aug 2016 16:51:01 +0100 Subject: [PATCH 050/324] Fix DM Channels --- src/client/rest/RESTMethods.js | 2 +- src/structures/DMChannel.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index abb5390da..fa62fa85f 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -56,7 +56,7 @@ class RESTMethods { channel = chan; req(); }) - .catch(reject); + .catch(reject); } else { req(); } diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 53d0be758..3714339bd 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -26,7 +26,7 @@ class DMChannel extends Channel { setup(data) { super.setup(data); - this.recipient = this.client.store.add('users', new User(this.client, data.recipient)); + this.recipient = this.client.store.add('users', new User(this.client, data.recipients[0])); this.lastMessageID = data.last_message_id; } From 603e231494cd7d93c5dfb867db8c35ba3eca764e Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 13 Aug 2016 17:04:49 +0100 Subject: [PATCH 051/324] Fix implicit permissions in roles --- src/structures/ServerChannel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/ServerChannel.js b/src/structures/ServerChannel.js index 2e7ee4f93..563058220 100644 --- a/src/structures/ServerChannel.js +++ b/src/structures/ServerChannel.js @@ -85,7 +85,7 @@ class ServerChannel extends Channel { permissions |= overwrite.allowData; } - const admin = Boolean(permissions & (Constants.PermissionFlags.MANAGE_ROLES)); + const admin = Boolean(permissions & (Constants.PermissionFlags.ADMINISTRATOR)); if (admin) { permissions = Constants.ALL_PERMISSIONS; } From 0d44a801f20e778ed1566a2cc61674efba50ebbd Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 13 Aug 2016 17:23:23 +0100 Subject: [PATCH 052/324] add support for Bot auth in REST --- src/client/rest/RESTManager.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/rest/RESTManager.js b/src/client/rest/RESTManager.js index 9db8403b7..2ebc184e8 100644 --- a/src/client/rest/RESTManager.js +++ b/src/client/rest/RESTManager.js @@ -67,7 +67,9 @@ class RESTManager { } if (auth) { - if (this.client.store.token) { + if (this.client.store.token && this.client.store.user && this.client.store.user.bot) { + apiRequest.set('authorization', `Bot ${this.client.store.token}`); + } else if (this.client.store.token) { apiRequest.set('authorization', this.client.store.token); } else { throw Constants.Errors.NO_TOKEN; @@ -99,6 +101,7 @@ class RESTManager { reject(err); } else { + console.log(res.headers); resolve(res ? res.body || {} : {}); } }); From 0224138dc979544df8aae394a0d6fe8c21df932a Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 13 Aug 2016 22:22:24 +0100 Subject: [PATCH 053/324] crappy ratelimiting it doesnt work but its here ok --- .eslintrc.js | 1 + src/client/rest/APIRequest.js | 43 ++++++++++++++ src/client/rest/Bucket.js | 62 ++++++++++++++++++++ src/client/rest/RESTManager.js | 101 ++++++--------------------------- src/util/Constants.js | 1 + test/random.js | 8 +++ 6 files changed, 131 insertions(+), 85 deletions(-) create mode 100644 src/client/rest/APIRequest.js create mode 100644 src/client/rest/Bucket.js diff --git a/.eslintrc.js b/.eslintrc.js index 2ea4a252b..a721fe464 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -12,5 +12,6 @@ module.exports = { "guard-for-in": 0, "no-restricted-syntax": 0, "no-param-reassign": 0, + "consistent-return": 0, } }; \ No newline at end of file diff --git a/src/client/rest/APIRequest.js b/src/client/rest/APIRequest.js new file mode 100644 index 000000000..462e78fdc --- /dev/null +++ b/src/client/rest/APIRequest.js @@ -0,0 +1,43 @@ +const request = require('superagent'); +const Constants = require('../../util/Constants'); + +class APIRequest { + constructor(rest, method, url, auth, data, file) { + this.rest = rest; + this.method = method; + this.url = url; + this.auth = auth; + this.data = data; + this.file = file; + } + + getBucketName() { + return `${this.method} ${this.url}`; + } + + getAuth() { + if (this.rest.client.store.token && this.rest.client.store.user && this.rest.client.store.user.bot) { + return `Bot ${this.rest.client.store.token}`; + } else if (this.rest.client.store.token) { + return this.rest.client.store.token; + } + throw Constants.Errors.NO_TOKEN; + } + + gen() { + const apiRequest = request[this.method](this.url); + if (this.auth) { + apiRequest.set('authorization', this.getAuth()); + } + if (this.data) { + apiRequest.send(this.data); + } + if (this.file) { + apiRequest.attach('file', this.file.file, this.file.name); + } + apiRequest.set('User-Agent', this.rest.userAgentManager.userAgent); + return apiRequest; + } +} + +module.exports = APIRequest; diff --git a/src/client/rest/Bucket.js b/src/client/rest/Bucket.js new file mode 100644 index 000000000..b93ca9607 --- /dev/null +++ b/src/client/rest/Bucket.js @@ -0,0 +1,62 @@ +class Bucket { + constructor(rest, limit, remainingRequests = 1, resetTime) { + this.rest = rest; + this.limit = limit; + this.remainingRequests = remainingRequests; + this.resetTime = resetTime; + this.locked = false; + this.queue = []; + this.nextCheck = null; + } + + setCheck(time) { + clearTimeout(this.nextCheck); + console.log('going to iterate in', time, 'remaining:', this.queue.length); + this.nextCheck = setTimeout(() => { + this.remainingRequests = this.limit - 1; + this.locked = false; + this.process(); + }, time); + } + + process() { + if (this.locked) { + return; + } + + this.locked = true; + + if (this.queue.length === 0) { + return; + } + + if (this.remainingRequests === 0) { + return; + } + console.log('bucket is going to iterate', Math.min(this.remainingRequests, this.queue.length), 'items with max', this.limit, 'and remaining', this.remainingRequests); + while (Math.min(this.remainingRequests, this.queue.length) > 0) { + const item = this.queue.shift(); + item.request.gen().end((err, res) => { + if (res && res.headers) { + this.limit = res.headers['x-ratelimit-limit']; + this.resetTime = Number(res.headers['x-ratelimit-reset']) * 1000; + this.setCheck((Math.max(500, this.resetTime - Date.now())) + 1000); + } + if (err) { + console.log(err.status, this.remainingRequests); + item.reject(err); + } else { + item.resolve(res && res.body ? res.body : {}); + } + }); + this.remainingRequests--; + } + } + + add(method) { + this.queue.push(method); + this.process(); + } +} + +module.exports = Bucket; diff --git a/src/client/rest/RESTManager.js b/src/client/rest/RESTManager.js index 2ebc184e8..d0275ff44 100644 --- a/src/client/rest/RESTManager.js +++ b/src/client/rest/RESTManager.js @@ -2,110 +2,41 @@ const request = require('superagent'); const Constants = require('../../util/Constants'); const UserAgentManager = require('./UserAgentManager'); const RESTMethods = require('./RESTMethods'); +const Bucket = require('./Bucket'); +const APIRequest = require('./APIRequest'); class RESTManager { constructor(client) { this.client = client; - this.queue = []; + this.buckets = {}; this.userAgentManager = new UserAgentManager(this); this.methods = new RESTMethods(this); this.rateLimitedEndpoints = {}; } - addRequestToQueue(method, url, auth, data, file, resolve, reject) { - const endpoint = url.replace(/\/[0-9]+/g, '/:id'); - - const rateLimitedEndpoint = this.rateLimitedEndpoints[endpoint]; - - rateLimitedEndpoint.queue = rateLimitedEndpoint.queue || []; - - rateLimitedEndpoint.queue.push({ - method, - url, - auth, - data, - file, - resolve, - reject, + addToBucket(bucket, apiRequest) { + return new Promise((resolve, reject) => { + bucket.add({ + request: apiRequest, + resolve, + reject, + }); }); } - processQueue(endpoint) { - const rateLimitedEndpoint = this.rateLimitedEndpoints[endpoint]; - - // prevent multiple queue processes - if (!rateLimitedEndpoint.timeout) { - return; - } - - // lock the queue - clearTimeout(rateLimitedEndpoint.timeout); - rateLimitedEndpoint.timeout = null; - - for (const item of rateLimitedEndpoint.queue) { - this.makeRequest(item.method, item.url, item.auth, item.data, item.file) - .then(item.resolve) - .catch(item.reject); - } - - rateLimitedEndpoint.queue = []; - } - makeRequest(method, url, auth, data, file) { /* file is {file, name} */ - const apiRequest = request[method](url); + const apiRequest = new APIRequest(this, method, url, auth, data, file); - const endpoint = url.replace(/\/[0-9]+/g, '/:id'); - - if (this.rateLimitedEndpoints[endpoint] && this.rateLimitedEndpoints[endpoint].timeout) { - return new Promise((resolve, reject) => { - this.addRequestToQueue(method, url, auth, data, file, resolve, reject); - }); + if (!this.buckets[apiRequest.getBucketName()]) { + console.log('new bucket', apiRequest.getBucketName()); + this.buckets[apiRequest.getBucketName()] = new Bucket(this, 1, 1); } - - if (auth) { - if (this.client.store.token && this.client.store.user && this.client.store.user.bot) { - apiRequest.set('authorization', `Bot ${this.client.store.token}`); - } else if (this.client.store.token) { - apiRequest.set('authorization', this.client.store.token); - } else { - throw Constants.Errors.NO_TOKEN; - } - } - - if (data) { - apiRequest.send(data); - } - - if (file) { - apiRequest.attach('file', file.file, file.name); - } - - apiRequest.set('User-Agent', this.userAgentManager.userAgent); - - return new Promise((resolve, reject) => { - apiRequest.end((err, res) => { - if (err) { - const retry = res.headers['retry-after'] || res.headers['Retry-After']; - if (retry) { - this.rateLimitedEndpoints[endpoint] = {}; - this.addRequestToQueue(method, url, auth, data, file, resolve, reject); - this.rateLimitedEndpoints[endpoint].timeout = setTimeout(() => { - this.processQueue(endpoint); - }, retry); - return; - } - - reject(err); - } else { - console.log(res.headers); - resolve(res ? res.body || {} : {}); - } - }); - }); + + return this.addToBucket(this.buckets[apiRequest.getBucketName()], apiRequest); } } diff --git a/src/util/Constants.js b/src/util/Constants.js index bfaf84e57..ae8ba951c 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -165,6 +165,7 @@ const PermissionFlags = exports.PermissionFlags = { ATTACH_FILES: 1 << 15, READ_MESSAGE_HISTORY: 1 << 16, MENTION_EVERYONE: 1 << 17, + EXTERNAL_EMOJIS: 1 << 18, CONNECT: 1 << 20, SPEAK: 1 << 21, diff --git a/test/random.js b/test/random.js index 54516b2be..ba89da291 100644 --- a/test/random.js +++ b/test/random.js @@ -141,6 +141,14 @@ client.on('message', message => { }).catch(console.log); } + if (message.content === 'ratelimittest') { + let i = 0; + while (i < 20) { + message.channel.sendMessage(`Testing my rates, item ${i} of 20`); + i++; + } + } + if (message.content === 'makerole') { message.guild.createRole().then(role => { message.channel.sendMessage(`Made role ${role.name}`); From 62856ff57a6bf70c2173386e103fd33b9c825703 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 14 Aug 2016 18:12:59 +0100 Subject: [PATCH 054/324] start work on documentation generator --- .eslintrc.js | 1 + docs/custom/getting_started.js | 8 +++++ docs/custom/index.js | 14 +++++++++ docs/docs.json | 1 + docs/gen/index.js | 53 ++++++++++++++++++++++++++++++++++ package.json | 7 +++-- 6 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 docs/custom/getting_started.js create mode 100644 docs/custom/index.js create mode 100644 docs/docs.json create mode 100644 docs/gen/index.js diff --git a/.eslintrc.js b/.eslintrc.js index a721fe464..d4ac453f8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,5 +13,6 @@ module.exports = { "no-restricted-syntax": 0, "no-param-reassign": 0, "consistent-return": 0, + "import/no-extraneous-dependencies": 0, } }; \ No newline at end of file diff --git a/docs/custom/getting_started.js b/docs/custom/getting_started.js new file mode 100644 index 000000000..fcf5e1e0a --- /dev/null +++ b/docs/custom/getting_started.js @@ -0,0 +1,8 @@ +module.exports = { + category: 'General', + name: 'Getting Started', + data: +`# Welcome! +discord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API. +`, +}; diff --git a/docs/custom/index.js b/docs/custom/index.js new file mode 100644 index 000000000..15fe93bb7 --- /dev/null +++ b/docs/custom/index.js @@ -0,0 +1,14 @@ +const files = [ + require('./getting_started'), +]; + +const categories = {}; +for (const file of files) { + file.category = file.category.toLowerCase(); + if (!categories[file.category]) { + categories[file.category] = {}; + } + categories[file.category][file.name] = file.data; +} + +module.exports = categories; diff --git a/docs/docs.json b/docs/docs.json new file mode 100644 index 000000000..e79ce6b00 --- /dev/null +++ b/docs/docs.json @@ -0,0 +1 @@ +{"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":[{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":3},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"returns":[{"type":{"names":["ClientUser"]},"description":"[description]"}],"meta":{"lineno":55,"filename":"Client.js","path":"src/client"},"order":2},{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":4},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":5},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":6},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":7},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":8},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":9},{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"examples":["client.login(\"token\");\n// or\nclient.login(\"email\", \"password\");"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":42,"filename":"Client.js","path":"src/client"},"order":1},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":60,"filename":"User.js","path":"src/structures"},"order":10}]} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js new file mode 100644 index 000000000..ddd4ef9c7 --- /dev/null +++ b/docs/gen/index.js @@ -0,0 +1,53 @@ +let fs; +/* eslint no-console:0 no-return-assign:0 */ +let parse; + +const customDocs = require('../custom/index'); + +const GEN_VERSION = 1; + +try { + fs = require('fs-extra'); + parse = require('jsdoc-parse'); +} catch (e) { + console.log('Error loading fs-extra or jsdoc-parse:'); + console.log(e); + process.exit(); +} + +console.log('Starting...'); + +let json = ''; + +const stream = parse({ + src: ['./src/*.js', './src/*/*.js'], +}); + +const cwd = (`${process.cwd()}\\`).replace(/\\/g, '/'); + +function cleanPaths() { + for (const item of json) { + if (item.meta && item.meta.path) { + item.meta.path = item.meta.path.replace(/\\/g, '/').replace(cwd, ''); + } + } +} + +function next() { + json = JSON.parse(json); + cleanPaths(); + console.log('parsed inline code'); + json = { + custom: customDocs, + json, + }; + fs.writeFile('./docs/docs.json', JSON.stringify(json, null, 0), err => { + if (err) { + throw err; + } + console.log('done'); + }); +} + +stream.on('data', chunk => json += chunk.toString('utf-8')); +stream.on('end', () => next()); diff --git a/package.json b/package.json index 09f090512..64bc6e480 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "A way to interface with the Discord API", "main": "./src/index", "scripts": { - "test": "node test/random" + "test": "node test/random", + "docs": "node docs/gen/index.js" }, "repository": { "type": "git", @@ -45,7 +46,9 @@ "grunt-contrib-uglify": "^0.11.0", "grunt-jscs": "^2.8.0", "jscs": "^2.11.0", - "load-grunt-tasks": "^3.3.0" + "load-grunt-tasks": "^3.3.0", + "fs-extra": "^0.30.0", + "jsdoc-parse": "^1.2.7" }, "optionalDependencies": { "node-opus": "^0.1.11" From 1ea53c18acef20c0b93d8b0e85a4e66895597645 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 14 Aug 2016 18:13:41 +0100 Subject: [PATCH 055/324] fix meta data for docs --- docs/docs.json | 2 +- docs/gen/index.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index e79ce6b00..e0cb59039 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":[{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":3},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"returns":[{"type":{"names":["ClientUser"]},"description":"[description]"}],"meta":{"lineno":55,"filename":"Client.js","path":"src/client"},"order":2},{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":4},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":5},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":6},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":7},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":8},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":9},{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"examples":["client.login(\"token\");\n// or\nclient.login(\"email\", \"password\");"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":42,"filename":"Client.js","path":"src/client"},"order":1},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":60,"filename":"User.js","path":"src/structures"},"order":10}]} \ No newline at end of file +{"meta":{"version":1},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":[{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":3},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"returns":[{"type":{"names":["ClientUser"]},"description":"[description]"}],"meta":{"lineno":55,"filename":"Client.js","path":"src/client"},"order":2},{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":4},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":5},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":6},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":7},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":8},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":9},{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"examples":["client.login(\"token\");\n// or\nclient.login(\"email\", \"password\");"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":42,"filename":"Client.js","path":"src/client"},"order":1},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":60,"filename":"User.js","path":"src/structures"},"order":10}]} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js index ddd4ef9c7..cb688b22e 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -38,6 +38,9 @@ function next() { cleanPaths(); console.log('parsed inline code'); json = { + meta: { + version: GEN_VERSION, + }, custom: customDocs, json, }; From eba3bd029169fa151e4fbea9caa9b43c882271ef Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 15 Aug 2016 22:07:01 +0100 Subject: [PATCH 056/324] Update documentation generator --- docs/docs.json | 2 +- docs/gen/index.js | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index e0cb59039..a347d8e0b 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":1},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":[{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":3},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"returns":[{"type":{"names":["ClientUser"]},"description":"[description]"}],"meta":{"lineno":55,"filename":"Client.js","path":"src/client"},"order":2},{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":4},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":5},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":6},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":7},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":8},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":9},{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"examples":["client.login(\"token\");\n// or\nclient.login(\"email\", \"password\");"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":42,"filename":"Client.js","path":"src/client"},"order":1},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":60,"filename":"User.js","path":"src/structures"},"order":10}]} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"examples":["client.login(\"token\");\n// or\nclient.login(\"email\", \"password\");"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":42,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"returns":[{"type":{"names":["ClientUser"]},"description":"[description]"}],"meta":{"lineno":55,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":3},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":60,"filename":"User.js","path":"src/structures"},"order":10}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":4},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":5},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":6},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":7},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":8},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":9}],"events":[]}}}} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js index cb688b22e..a12185e5a 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -4,7 +4,7 @@ let parse; const customDocs = require('../custom/index'); -const GEN_VERSION = 1; +const GEN_VERSION = 2; try { fs = require('fs-extra'); @@ -33,10 +33,33 @@ function cleanPaths() { } } +function clean() { + const cleaned = { + classes: {}, + }; + for (const item of json) { + if (item.kind === 'class') { + cleaned.classes[item.longname] = { + meta: item, + functions: [], + properties: [], + events: [], + }; + } else if (item.kind === 'member') { + cleaned.classes[item.memberof].properties.push(item); + } else if (item.kind === 'function' && item.memberof) { + cleaned.classes[item.memberof].functions.push(item); + } + } + json = cleaned; +} + function next() { json = JSON.parse(json); cleanPaths(); console.log('parsed inline code'); + console.log(json); + clean(); json = { meta: { version: GEN_VERSION, From 4fff20d66e538951e4716be8c67e43297c432cab Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 16 Aug 2016 23:22:52 +0100 Subject: [PATCH 057/324] update some docs --- docs/docs.json | 2 +- src/client/Client.js | 2 +- src/structures/Message.js | 3 +++ src/structures/TextChannel.js | 3 +++ src/structures/VoiceChannel.js | 3 +++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index a347d8e0b..763d02951 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"examples":["client.login(\"token\");\n// or\nclient.login(\"email\", \"password\");"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":42,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"returns":[{"type":{"names":["ClientUser"]},"description":"[description]"}],"meta":{"lineno":55,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":3},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":60,"filename":"User.js","path":"src/structures"},"order":10}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":4},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":5},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":6},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":7},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":8},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":9}],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"examples":["client.login(\"token\");\n// or\nclient.login(\"email\", \"password\");"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":42,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":55,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":3},"functions":[],"properties":[],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":4},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":5},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":60,"filename":"User.js","path":"src/structures"},"order":12}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":6},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":7},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":8},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":9},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":10},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":11}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":13},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 52ed353a2..f61596d12 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -50,7 +50,7 @@ class Client extends EventEmitter { /** * The User of the logged in Client, only available after `READY` has been fired. - * @return {ClientUser} [description] + * @type {ClientUser} */ get user() { return this.store.user; diff --git a/src/structures/Message.js b/src/structures/Message.js index b565737ce..c225fe697 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -1,3 +1,6 @@ +/** + * Represents a Message on Discord + */ class Message { constructor(channel, data, client) { this.channel = channel; diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index c87b27ed4..6775e2989 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -2,6 +2,9 @@ const ServerChannel = require('./ServerChannel'); const TextChannelDataStore = require('./datastore/TextChannelDataStore'); const TextBasedChannel = require('./interface/TextBasedChannel'); +/** + * Represents a Server Text Channel on Discord. + */ class TextChannel extends ServerChannel { constructor(guild, data) { diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index 4a4f6c253..8e01ebfc1 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -1,6 +1,9 @@ const ServerChannel = require('./ServerChannel'); const VoiceChannelDataStore = require('./datastore/VoiceChannelDataStore'); +/** + * Represents a Server Voice Channel on Discord. + */ class VoiceChannel extends ServerChannel { constructor(guild, data) { super(guild, data); From 13db0db298576df7c2a9bd804c018e94bf1e09b6 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 17 Aug 2016 15:50:27 +0100 Subject: [PATCH 058/324] updated client docs --- docs/docs.json | 2 +- src/client/Client.js | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 763d02951..1231865bf 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"examples":["client.login(\"token\");\n// or\nclient.login(\"email\", \"password\");"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":42,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":55,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":3},"functions":[],"properties":[],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":4},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":5},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":60,"filename":"User.js","path":"src/structures"},"order":12}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":6},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":7},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":8},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":9},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":10},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":11}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":13},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":3},"functions":[],"properties":[],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":4},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":5},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":60,"filename":"User.js","path":"src/structures"},"order":12}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":6},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":7},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":8},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":9},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":10},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":11}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":13},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index f61596d12..111cc1314 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -35,9 +35,14 @@ class Client extends EventEmitter { * @param {string} [password] The password for the account, only needed if an email was provided. * @return {Promise} * @example - * client.login("token"); - * // or - * client.login("email", "password"); + * // log the client in using a token + * const token = 'my token'; + * client.login(token); + * @example + * // log the client in using email and password + * const email = 'user@email.com'; + * const password = 'supersecret123'; + * client.login(email, password); */ login(email, password) { if (password) { From e7e6355cfe3ff211907fe7925442f4c952495a4d Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 17 Aug 2016 16:28:31 +0100 Subject: [PATCH 059/324] work on guild docs --- docs/docs.json | 2 +- src/structures/Guild.js | 109 ++++++++++++++++++++++++++++++++++++++++ src/structures/User.js | 10 ++++ 3 files changed, 120 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 1231865bf..cf5db4f05 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":3},"functions":[],"properties":[],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":4},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":5},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":60,"filename":"User.js","path":"src/structures"},"order":12}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":6},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":7},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":8},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":9},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":10},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":11}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":13},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","meta":{"lineno":22,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":98,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":112,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":124,"filename":"Guild.js","path":"src/structures"},"order":11}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":32,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":38,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":49,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":54,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":163,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":168,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":173,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":178,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":183,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":188,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":193,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":198,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":203,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":208,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":213,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":218,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":223,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":250,"filename":"Guild.js","path":"src/structures"},"order":26}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":27},"functions":[],"properties":[],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":28},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":29},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":37},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":38}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":30},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":31},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":32},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":33},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":34},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":35},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":36}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":39},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 596d9bf7a..8707dc94a 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -19,9 +19,22 @@ function arraysEqual(a, b) { return b.length === 0; } +/** + * Represents a Guild (or a Server) on Discord. + * @class Guild + */ class Guild { constructor(client, data) { + /** + * The Client that created the instance of the the Guild. + * @type {Client} + */ this.client = client; + + /** + * The data store of the Guild. + * @type {GuildDataStore} + */ this.store = new GuildDataStore(); if (!data) { @@ -29,7 +42,15 @@ class Guild { } if (data.unavailable) { + /** + * Whether the Guild is available to access. If it is not available, it indicates a server outage. + * @type {Boolean} + */ this.available = false; + /** + * The Unique ID of the Guild, useful for comparisons. + * @type {String} + */ this.id = data.id; } else { this.available = true; @@ -64,14 +85,42 @@ class Guild { this.store.remove('members', guildMember); } + /** + * When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object. + * @returns {String} + * @example + * // logs: Hello from My Guild! + * console.log(`Hello from ${guild}!`); + * @example + * // logs: Hello from My Guild! + * console.log(`Hello from ' + guild + '!'); + */ toString() { return this.name; } + /** + * Tries to kick a member from the guild. + * @param {GuildMemberResolvable} member the member to kick + * @returns {Promise} + * @example + * // kicks a member from a guild: + * guild.kick(message.author) + * .then(member => console.log(`Kicked ${member}`)) + * .catch(error => console.log(error)); + */ kick(member) { return this.member(member).kick(); } + /** + * Returns the GuildMember form of a User object, if the User is present in the guild. + * @param {UserResolvable} user the user that you want to obtain the GuildMember of. + * @returns {GuildMember|null} + * @example + * // get the guild member of a user + * const member = guild.member(message.author); + */ member(user) { return this.client.resolver.resolveGuildMember(this, user); } @@ -107,18 +156,70 @@ class Guild { setup(data) { this.id = data.id; this.available = !data.unavailable; + /** + * The hash of the guild splash image, or null if no splash (VIP only) + * @type {?String} + */ this.splash = data.splash; + /** + * The region the guild is located in + * @type {String} + */ this.region = data.region; + /** + * The name of the guild + * @type {String} + */ this.name = data.name; + /** + * The amount of initial members in the guild. + * @type {Number} + */ this.memberCount = data.member_count; + /** + * Whether the guild is "large" (has more than 250 members) + * @type {Boolean} + */ this.large = data.large; + /** + * The date at which the logged-in client joined the guild. + * @type {Date} + */ this.joinDate = new Date(data.joined_at); + /** + * The hash of the guild icon, or null if there is no icon. + * @type {?String} + */ this.icon = data.icon; + /** + * An array of guild features. + * @type {Array} + */ this.features = data.features; + /** + * An array of guild emojis. + * @type {Array} + */ this.emojis = data.emojis; + /** + * The time in seconds before a user is counted as "away from keyboard". + * @type {?Number} + */ this.afkTimeout = data.afk_timeout; + /** + * The ID of the voice channel where AFK members are moved. + * @type {?String} + */ this.afkChannelID = data.afk_channel_id; + /** + * Whether embedded images are enabled on this guild. + * @type {Boolean} + */ this.embedEnabled = data.embed_enabled; + /** + * The verification level of the guild. + * @type {Number} + */ this.verificationLevel = data.verification_level; this.features = data.features || []; @@ -129,6 +230,10 @@ class Guild { } } + /** + * The owner of the guild + * @type {User} + */ this.owner = this.store.get('members', data.owner_id); if (data.channels) { @@ -138,6 +243,10 @@ class Guild { } } + /** + * The embed channel of the Guild. + * @type {GuildChannel} + */ this.embedChannel = this.store.get('channels', data.embed_channel_id); if (data.roles) { diff --git a/src/structures/User.js b/src/structures/User.js index 823c8597d..1d8c4a497 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -46,6 +46,10 @@ class User { * @type {String} */ this.status = data.status || this.status || 'offline'; + /** + * The game that the user is playing, `null` if they aren't playing a game. + * @type {String} + */ this.game = data.game || this.game; } @@ -61,6 +65,12 @@ class User { return this.client.rest.methods.deleteChannel(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. + * @param {User} user the user to compare + * @returns Boolean + */ equals(user) { let base = ( this.username === user.username && From e7ef73ffdc4f4cb8a32cf3b0213029b2c5914730 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 17 Aug 2016 16:33:53 +0100 Subject: [PATCH 060/324] work on guild docs --- docs/docs.json | 2 +- src/structures/Guild.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index cf5db4f05..5197521eb 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","meta":{"lineno":22,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":98,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":112,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":124,"filename":"Guild.js","path":"src/structures"},"order":11}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":32,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":38,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":49,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":54,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":163,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":168,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":173,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":178,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":183,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":188,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":193,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":198,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":203,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":208,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":213,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":218,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":223,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":250,"filename":"Guild.js","path":"src/structures"},"order":26}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":27},"functions":[],"properties":[],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":28},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":29},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":37},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":38}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":30},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":31},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":32},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":33},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":34},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":35},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":36}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":39},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":27},"functions":[],"properties":[],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":28},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":29},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":37},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":38}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":30},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":31},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":32},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":33},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":34},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":35},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":36}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":39},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 8707dc94a..2c2e3a9f3 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -21,7 +21,6 @@ function arraysEqual(a, b) { /** * Represents a Guild (or a Server) on Discord. - * @class Guild */ class Guild { constructor(client, data) { @@ -125,6 +124,13 @@ class Guild { return this.client.resolver.resolveGuildMember(this, user); } + /** + * 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 + * what most users need. + * @param {Guild} guild the guild to compare + * @returns {Boolean} + */ equals(data) { let base = this.id === data.id && From 2b7dd39f3eef3a3069cdfc64fe7f04b803310b5a Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 17 Aug 2016 16:57:22 +0100 Subject: [PATCH 061/324] work on guild docs --- docs/docs.json | 2 +- src/structures/Guild.js | 136 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 5197521eb..d22a69ac8 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":27},"functions":[],"properties":[],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":28},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":29},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":37},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":38}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":30},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":31},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":32},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":33},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":34},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":35},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":36}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":39},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["any"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":41},"functions":[],"properties":[],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":42},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":43},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":51},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":52}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":44},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":45},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":46},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":47},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":48},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":49},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":50}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":53},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 2c2e3a9f3..52a1cc9c8 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -287,58 +287,194 @@ class Guild { } } + /** + * Creates a new Channel in the Guild. + * @param {String} name the name of the new channel. + * @param {any} type the type of the new channel, either `text` or `voice`. + * @returns {Promise} + * @example + * // create a new text channel + * guild.createChannel('new general', 'text') + * .then(channel => console.log(`Created new channel ${channel}`)) + * .catch(console.log); + */ createChannel(name, type) { return this.client.rest.methods.createChannel(this, name, type); } + /** + * Creates a new role in the guild, as of now this is just a blank role. + * @returns {Promise} + * @example + * // create a new role + * guild.createRole() + * .then(role => console.log(`Created role ${role}`)) + * .catch(console.log); + */ createRole() { return this.client.rest.methods.createGuildRole(this); } + /** + * Causes the Client to leave the guild. + * @returns {Promise} + * @example + * // leave a guild + * guild.leave() + * .then(g => console.log(`Left the guild ${g}`)) + * .catch(console.log); + */ leave() { return this.client.rest.methods.leaveGuild(this); } + /** + * Causes the Client to delete the guild. + * @returns {Promise} + * @example + * // delete a guild + * guild.delete() + * .then(g => console.log(`Deleted the guild ${g}`)) + * .catch(console.log); + */ delete() { return this.client.rest.methods.deleteGuild(this); } + /** + * Updates the Guild with new information - e.g. a new name. + * @param {GuildEditData} data the data to update the guild with. + * @returns {Promise} + * @example + * // set the guild name and region + * guild.edit({ + * name: 'Discord Guild', + * region: 'london', + * }) + * .then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`)) + * .catch(console.log); + */ edit(data) { return this.client.rest.methods.updateGuild(this, data); } + /** + * Edit the name of the Guild. + * @param {String} name the new name of the Guild. + * @returns {Promise} + * @example + * // edit the guild name + * guild.setName('Discord Guild') + * .then(updated => console.log(`Updated guild name to ${guild.name}`)) + * .catch(console.log); + */ setName(name) { return this.edit({ name }); } + /** + * Edit the region of the Guild. + * @param {Region} region the new region of the guild. + * @returns {Promise} + * @example + * // edit the guild region + * guild.setRegion('london') + * .then(updated => console.log(`Updated guild region to ${guild.region}`)) + * .catch(console.log); + */ setRegion(region) { return this.edit({ region }); } + /** + * Edit the verification level of the Guild. + * @param {VerificationLevel} verificationLevel the new verification level of the guild. + * @returns {Promise} + * @example + * // edit the guild verification level + * guild.setVerificationLevel(1) + * .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`)) + * .catch(console.log); + */ setVerificationLevel(verificationLevel) { return this.edit({ verificationLevel }); } + /** + * Edit the AFK channel of the Guild. + * @param {GuildChannelResolvable} afkChannel the new AFK channel. + * @returns {Promise} + * @example + * // edit the guild AFK channel + * guild.setAFKChannel(channel) + * .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`)) + * .catch(console.log); + */ setAFKChannel(afkChannel) { return this.edit({ afkChannel }); } + /** + * Edit the AFK timeout of the Guild. + * @param {Number} afkTimeout the time in seconds that a user must be idle to be considered AFK. + * @returns {Promise} + * @example + * // edit the guild AFK channel + * guild.setAFKTimeout(60) + * .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`)) + * .catch(console.log); + */ setAFKTimeout(afkTimeout) { return this.edit({ afkTimeout }); } + /** + * Set a new Guild Icon. + * @param {Base64Resolvable} icon the new icon of the guild. + * @returns {Promise} + * @example + * // edit the guild icon + * guild.setIcon(fs.readFileSync('./icon.png')) + * .then(updated => console.log('Updated the guild icon')) + * .catch(console.log); + */ setIcon(icon) { return this.edit({ icon }); } + /** + * Sets a new owner of the Guild. + * @param {GuildMemberResolvable} owner the new owner of the Guild. + * @returns {Promise} + * @example + * // edit the guild owner + * guild.setOwner(guilds.members[0]) + * .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`)) + * .catch(console.log); + */ setOwner(owner) { return this.edit({ owner }); } + /** + * Set a new Guild Splash Logo. + * @param {Base64Resolvable} splash the new splash screen of the guild. + * @returns {Promise} + * @example + * // edit the guild splash + * guild.setIcon(fs.readFileSync('./splash.png')) + * .then(updated => console.log('Updated the guild splash')) + * .catch(console.log); + */ setSplash(splash) { return this.edit({ splash }); } + /** + * The channels in the guild. + * @type {Array} + * @readonly + */ get channels() { return this.store.getAsArray('channels'); } get $channels() { return this.store.data.channels; } From 9dc8265a9350b45b0f3c884d3912105d4ddf5326 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 17 Aug 2016 17:06:37 +0100 Subject: [PATCH 062/324] work on guild docs --- docs/docs.json | 2 +- src/structures/Guild.js | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index d22a69ac8..c24d06147 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["any"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":41},"functions":[],"properties":[],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":42},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":43},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":51},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":52}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":44},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":45},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":46},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":47},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":48},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":49},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":50}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":53},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["any"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":45}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":46},"functions":[],"properties":[],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":47},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":48},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":56},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":57}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":49},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":50},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":51},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":52},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":53},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":54},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":55}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":58},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 52a1cc9c8..88cae06ae 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -477,14 +477,42 @@ class Guild { */ get channels() { return this.store.getAsArray('channels'); } + /** + * A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel + * in the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient. + * @readonly + * @type {Object} + */ get $channels() { return this.store.data.channels; } + /** + * The roles in the guild. + * @type {Array} + * @readonly + */ get roles() { return this.store.getAsArray('roles'); } + /** + * A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role + * in the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient. + * @readonly + * @type {Object} + */ get $roles() { return this.store.data.roles; } + /** + * The members of the guild. + * @type {Array} + * @readonly + */ get members() { return this.store.getAsArray('members'); } + /** + * A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member + * in the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient. + * @readonly + * @type {Object} + */ get $members() { return this.store.data.members; } } From 614c488f966d29d1a1bb1e86845c1bff656e7ddb Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 17 Aug 2016 19:15:33 +0100 Subject: [PATCH 063/324] work on docs --- docs/docs.json | 2 +- src/structures/Message.js | 82 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index c24d06147..db14380bb 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["any"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":45}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":46},"functions":[],"properties":[],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":47},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":48},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":56},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":57}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":49},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":50},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":51},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":52},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":53},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":54},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":55}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":58},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["any"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":45}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":46},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":149,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":183,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":197,"filename":"Message.js","path":"src/structures"},"order":63}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":47},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":48},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":49},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":50},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":51},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":52},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":53},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":54},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":55},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":56},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":57},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","meta":{"lineno":84,"filename":"Message.js","path":"src/structures"},"order":60}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":64},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":65},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":73},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":74}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":66},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":67},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":68},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":69},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":70},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":71},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":72}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":75},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/Message.js b/src/structures/Message.js index c225fe697..132086236 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -3,12 +3,24 @@ */ class Message { constructor(channel, data, client) { + /** + * The channel that the message was sent in + * @type {Channel} + */ this.channel = channel; if (channel.guild) { + /** + * If the message was sent in a guild, this will be the guild the message was sent in + * @type {?Guild} + */ this.guild = channel.guild; } + /** + * The client that instantiated the Object + * @type {Client} + */ this.client = client; if (data) { this.setup(data); @@ -16,16 +28,59 @@ class Message { } setup(data) { + /** + * The author of the message + * @type {User} + */ this.author = this.client.store.newUser(data.author); + /** + * The content of the message + * @type {String} + */ this.content = data.content; + /** + * When the message was sent + * @type {Date} + */ this.timestamp = new Date(data.timestamp); + /** + * If the message was edited, the timestamp at which it was last edited + * @type {?Date} + */ this.editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp) : null; + /** + * Whether or not the message was Text-To-Speech + * @type {Boolean} + */ this.tts = data.tts; + /** + * Whether the message mentioned @everyone or not + * @type {Boolean} + */ this.mentionEveryone = data.mention_everyone; + /** + * A random number used for checking message delivery + * @type {String} + */ this.nonce = data.nonce; + /** + * A list of embeds in the message - e.g. YouTube Player + * @type {Array} + */ this.embeds = data.embeds; + /** + * A list of attachments in the message - e.g. Pictures + * @type {Array} + */ this.attachments = data.attachments; + /** + * A list of users mentioned in the message + * @type {Array} + */ this.mentions = []; + /** + * The ID of the message (unique in the channel it was sent) + */ this.id = data.id; for (const mention of data.mentions) { let user = this.client.store.get('users', mention.id); @@ -83,6 +138,14 @@ class Message { } } + /** + * Used mainly internally. Whether two messages are identical in properties. If you want to compare messages + * without checking all the properties, use `message.id === message2.id`, which is much more efficient. This + * method allows you to see if there are differences in content, embeds, attachments, nonce and tts properties. + * @param {Message} message The message to compare it to + * @param {Object} rawData Raw data passed through the WebSocket about this message + * @returns {Boolean} + */ equals(message, rawData) { const embedUpdate = !message.author && !message.attachments; @@ -108,10 +171,29 @@ class Message { return base; } + /** + * Deletes the message + * @returns {Promise} + * @example + * // delete a message + * message.delete() + * .then(msg => console.log(`Deleted message from ${msg.author}`)) + * .catch(console.log); + */ delete() { return this.client.rest.methods.deleteMessage(this); } + /** + * Edit the content of a message + * @param {String} content the new content of a message + * @returns {Promise} + * @example + * // update the content of a message + * message.edit('This is my new content!') + * .then(msg => console.log(`Updated the content of a message from ${msg.author}`)) + * .catch(console.log); + */ edit(content) { return this.client.rest.methods.updateMessage(this, content); } From 79ea663afeafc753472c8f008033f655cf759ce0 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 17 Aug 2016 19:18:39 +0100 Subject: [PATCH 064/324] Fix guild.createChannel docs --- docs/docs.json | 2 +- src/structures/Guild.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index db14380bb..b7c5cfa36 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["any"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":45}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":46},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":149,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":183,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":197,"filename":"Message.js","path":"src/structures"},"order":63}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":47},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":48},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":49},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":50},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":51},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":52},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":53},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":54},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":55},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":56},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":57},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","meta":{"lineno":84,"filename":"Message.js","path":"src/structures"},"order":60}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":64},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":65},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":73},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":74}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":66},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":67},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":68},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":69},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":70},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":71},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":72}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":75},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":45}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":46},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":149,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":183,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":197,"filename":"Message.js","path":"src/structures"},"order":63}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":47},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":48},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":49},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":50},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":51},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":52},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":53},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":54},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":55},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":56},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":57},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","meta":{"lineno":84,"filename":"Message.js","path":"src/structures"},"order":60}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":64},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":65},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":73},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":74}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":66},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":67},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":68},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":69},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":70},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":71},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":72}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":75},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 88cae06ae..9262b9e42 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -290,7 +290,7 @@ class Guild { /** * Creates a new Channel in the Guild. * @param {String} name the name of the new channel. - * @param {any} type the type of the new channel, either `text` or `voice`. + * @param {String} type the type of the new channel, either `text` or `voice`. * @returns {Promise} * @example * // create a new text channel From ab92be4209e526ecf713d0a8d546adb7a1adbdc3 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 17 Aug 2016 19:22:18 +0100 Subject: [PATCH 065/324] Add a type to Message.id in docs --- docs/docs.json | 2 +- src/structures/Message.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index b7c5cfa36..d5b498194 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":45}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":46},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":149,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":183,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":197,"filename":"Message.js","path":"src/structures"},"order":63}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":47},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":48},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":49},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":50},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":51},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":52},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":53},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":54},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":55},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":56},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":57},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","meta":{"lineno":84,"filename":"Message.js","path":"src/structures"},"order":60}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":64},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":65},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":73},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":74}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":66},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":67},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":68},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":69},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":70},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":71},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":72}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":75},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":45}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":46},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":63}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":47},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":48},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":49},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":50},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":51},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":52},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":53},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":54},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":55},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":56},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":57},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":60}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":64},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":65},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":73},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":74}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":66},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":67},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":68},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":69},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":70},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":71},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":72}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":75},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/Message.js b/src/structures/Message.js index 132086236..6cfa46167 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -80,6 +80,7 @@ class Message { this.mentions = []; /** * The ID of the message (unique in the channel it was sent) + * @type {String} */ this.id = data.id; for (const mention of data.mentions) { From 238a6824ef95a8f819812a6cd491a99be8f5fc97 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 17 Aug 2016 19:40:12 +0100 Subject: [PATCH 066/324] Add documentation for Roles --- docs/docs.json | 2 +- src/structures/Role.js | 130 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 130 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index d5b498194..5ed61f79e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":45}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":46},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":63}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":47},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":48},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":49},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":50},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":51},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":52},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":53},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":54},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":55},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":56},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":57},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":60}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":64},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":65},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":73},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":74}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":66},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":67},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":68},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":69},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":70},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":71},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":72}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":75},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":45}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":46},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":63}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":47},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":48},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":49},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":50},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":51},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":52},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":53},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":54},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":55},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":56},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":57},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":60}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":64},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":74},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":75},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":76},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":82}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":65},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":66},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":67},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":68},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":69},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":70},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":71},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":72},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":73}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":83},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":84},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":92},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":93}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":85},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":86},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":87},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":88},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":89},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":90},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":91}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":94},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/Role.js b/src/structures/Role.js index 9d14c9074..42599822d 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -1,8 +1,19 @@ const Constants = require('../util/Constants'); +/** + * Represents a Role on Discord + */ class Role { constructor(guild, data) { + /** + * The guild that the role belongs to + * @type {Guild} + */ this.guild = guild; + /** + * The client that instantiated the role + * @type {Client} + */ this.client = guild.client; if (data) { this.setup(data); @@ -22,43 +33,147 @@ class Role { } setup(data) { + /** + * The ID of the role (unique to the guild it is part of) + * @type {String} + */ this.id = data.id; + /** + * The name of the role + * @type {String} + */ this.name = data.name; + /** + * The base 10 color of the role + * @type {Number} + */ this.color = data.color; + /** + * If true, users that are part of this role will appear in a separate category in the users list + * @type {Boolean} + */ this.hoist = data.hoist; + /** + * The position of the role in the role manager + * @type {Number} + */ this.position = data.position; + /** + * The evaluated permissions number + * @type {Number} + */ this.permissions = data.permissions; + /** + * Whether or not the role is managed by an external service + * @type {Boolean} + */ this.managed = data.managed; } + /** + * Deletes the role + * @returns {Promise} + * @example + * // delete a role + * role.delete() + * .then(r => console.log(`Deleted role ${r}`)) + * .catch(console.log); + */ delete() { return this.client.rest.methods.deleteGuildRole(this); } + /** + * Edits the role + * @param {RoleData} data the new data for the role + * @returns {Promise} + * @example + * // edit a role + * role.edit({name: 'new role'}) + * .then(r => console.log(`Edited role ${r}`)) + * .catch(console.log); + */ edit(data) { return this.client.rest.methods.updateGuildRole(this, data); } + /** + * Set a new name for the role + * @param {String} name the new name of the role + * @returns {Promise} + * @example + * // set the name of the role + * role.setName('new role') + * .then(r => console.log(`Edited name of role ${r}`)) + * .catch(console.log); + */ setName(name) { return this.client.rest.methods.updateGuildRole(this, { name }); } + /** + * Set a new color for the role + * @param {Number} color the new color for the role + * @returns {Promise} + * @example + * // set the color of a role + * role.setColor(parseInt('FF0000', 16)) + * .then(r => console.log(`Set color of role ${r}`)) + * .catch(console.log); + */ setColor(color) { return this.client.rest.methods.updateGuildRole(this, { color }); } + /** + * Set whether or not the role should be hoisted + * @param {Boolean} hoist whether or not to hoist the role + * @returns {Promise} + * @example + * // set the hoist of the role + * role.setHoist(true) + * .then(r => console.log(`Role hoisted: ${r.hoist}`)) + * .catch(console.log); + */ setHoist(hoist) { return this.client.rest.methods.updateGuildRole(this, { hoist }); } + /** + * Set the position of the role + * @param {Number} position the position of the role + * @returns {Promise} + * @example + * // set the position of the role + * role.setPosition(1) + * .then(r => console.log(`Role position: ${r.position}`)) + * .catch(console.log); + */ setPosition(position) { return this.client.rest.methods.updateGuildRole(this, { position }); } + /** + * Set the permissions of the role + * @param {Array} permissions the permissions of the role + * @returns {Promise} + * @example + * // set the permissions of the role + * role.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS']) + * .then(r => console.log(`Role updated ${r}`)) + * .catch(console.log); + */ setPermissions(permissions) { return this.client.rest.methods.updateGuildRole(this, { permissions }); } + /** + * Get an object mapping permission names to whether or not the role enables that permission + * @returns {Object} + * @example + * // print the serialized role + * console.log(role.serialize()); + */ serialize() { const serializedPermissions = {}; for (const permissionName in Constants.PermissionFlags) { @@ -68,7 +183,20 @@ class Role { return serializedPermissions; } - hasPermission(permission, explicit) { + /** + * Whether or not the role includes the given permission + * @param {String} permission the name of the permission to test + * @param {Boolean} [explicit=false] whether or not the inclusion of the permission is explicit + * @returns {Boolean} + * @example + * // see if a role can ban a member + * if (role.hasPermission('BAN_MEMBERS')) { + * console.log('This role can ban members'); + * } else { + * console.log('This role can't ban members'); + * } + */ + hasPermission(permission, explicit = false) { if (permission instanceof String || typeof permission === 'string') { permission = Constants.PermissionFlags[permission]; } From 19f8f8e12291411a7567969d921c7b30ef2d3734 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 17 Aug 2016 20:08:41 +0100 Subject: [PATCH 067/324] Fix role.hasPermission docs --- docs/docs.json | 2 +- src/structures/Role.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 5ed61f79e..5b49e3cf7 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":45}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":46},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":63}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":47},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":48},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":49},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":50},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":51},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":52},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":53},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":54},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":55},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":56},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":57},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":60}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":64},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":74},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":75},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":76},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":82}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":65},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":66},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":67},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":68},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":69},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":70},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":71},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":72},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":73}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":83},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":84},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":92},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":93}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":85},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":86},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":87},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":88},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":89},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":90},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":91}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":94},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":45}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":46},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":63}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":47},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":48},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":49},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":50},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":51},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":52},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":53},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":54},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":55},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":56},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":57},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":60}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":64},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":74},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":75},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":76},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":82}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":65},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":66},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":67},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":68},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":69},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":70},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":71},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":72},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":73}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":83},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":84},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":92},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":93}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":85},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":86},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":87},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":88},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":89},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":90},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":91}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":94},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/Role.js b/src/structures/Role.js index 42599822d..b67a101d3 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -193,7 +193,7 @@ class Role { * if (role.hasPermission('BAN_MEMBERS')) { * console.log('This role can ban members'); * } else { - * console.log('This role can't ban members'); + * console.log('This role can\'t ban members'); * } */ hasPermission(permission, explicit = false) { From 562e3b119e017b18e566059706a094b2476159c5 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 17 Aug 2016 20:33:17 +0100 Subject: [PATCH 068/324] Fix user docs --- docs/docs.json | 2 +- src/structures/User.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 5b49e3cf7..02ed16ff1 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":45}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":46},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":63}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":47},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":48},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":49},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":50},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":51},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":52},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":53},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":54},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":55},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":56},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":57},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":60}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":64},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":74},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":75},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":76},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":82}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":65},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":66},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":67},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":68},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":69},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":70},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":71},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":72},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":73}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":83},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":84},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":92},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"description":"Boolean"}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":93}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":85},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":86},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":87},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":88},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":89},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":90},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":91}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":94},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":45}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":46},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":63}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":47},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":48},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":49},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":50},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":51},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":52},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":53},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":54},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":55},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":56},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":57},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":60}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":64},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":74},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":75},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":76},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":82}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":65},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":66},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":67},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":68},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":69},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":70},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":71},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":72},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":73}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":83},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":84},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":92},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":93}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":85},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":86},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":87},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":88},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":89},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":90},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":91}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":94},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/User.js b/src/structures/User.js index 1d8c4a497..a487587e8 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -69,7 +69,7 @@ class User { * 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. * @param {User} user the user to compare - * @returns Boolean + * @returns {Boolean} */ equals(user) { let base = ( From c37191b582895f3f48fe6ec3411ff6a1ac6c5a5c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 17 Aug 2016 23:46:58 +0100 Subject: [PATCH 069/324] Write some more docs --- docs/docs.json | 2 +- src/structures/Channel.js | 20 +++++++++++++ src/structures/ClientUser.js | 58 +++++++++++++++++++++++++++++++++++- src/structures/User.js | 7 +++++ 4 files changed, 85 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 02ed16ff1..5c06239b0 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":3},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":8},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":9},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":10},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":11},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":39}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":4},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":5},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":6},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":7},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":12},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":13},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":14},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":45}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":46},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":63}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":47},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":48},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":49},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":50},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":51},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":52},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":53},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":54},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":55},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":56},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":57},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":60}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":64},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":74},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":75},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":76},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":82}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":65},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":66},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":67},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":68},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":69},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":70},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":71},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":72},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":73}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":83},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":84},"functions":[{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":92},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":74,"filename":"User.js","path":"src/structures"},"order":93}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":85},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":86},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":87},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":88},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":89},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":90},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":91}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":94},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"meta":{"lineno":3,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":35,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":65,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":78,"filename":"ClientUser.js","path":"src/structures"},"order":14},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":115},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":116},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":117}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":15,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":108},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":109},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":110},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":111},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":112},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":113},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":114}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":15},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":51}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":57}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":58},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":74},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":75}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":60},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":63},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":64},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":65},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":66},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":67},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":68},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":69},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":70},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":71},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":72}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":76},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":86},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":87},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":88},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":93},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":94}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":82},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":83},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":84},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":85}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":95},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":96},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":104},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":105},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":106}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":97},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":98},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":99},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":100},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":101},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":102},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":103}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":107},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/Channel.js b/src/structures/Channel.js index c9bed1141..8dd95404b 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -1,5 +1,12 @@ +/** + * Represents any Channel on Discord + */ class Channel { constructor(client, data, guild) { + /** + * The client that instantiated the Channel + * @type {Channel} + */ this.client = client; this.typingMap = {}; this.typingTimeouts = []; @@ -13,9 +20,22 @@ class Channel { } setup(data) { + /** + * The unique ID of the channel + * @type {String} + */ this.id = data.id; } + /** + * Deletes the channel + * @return {Promise} + * @example + * // delete the channel + * channel.delete() + * .then() // success + * .catch(console.log); // log error + */ delete() { return this.client.rest.methods.deleteChannel(this); } diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 412587785..b3b224d66 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -1,24 +1,80 @@ const User = require('./User'); +/** + * Represents the logged in client's Discord User + * @class ClientUser + * @extends {User} + */ class ClientUser extends User { setup(data) { super.setup(data); + /** + * Whether or not this account has been verified + * @type {Boolean} + */ this.verified = data.verified; + /** + * The email of this account + * @type {String} + */ this.email = data.email; } + /** + * Set the username of the logged in Client. + * Changing usernames in Discord is heavily rate limited, with only 2 requests + * every hour. Use this sparingly! + * @param {String} username the new username + * @returns {Promise} + * @example + * // set username + * client.store.user.setUsername('discordjs') + * .then(user => console.log(`My new username is ${user.username}`)) + * .catch(console.log); + */ setUsername(username) { return this.client.rest.methods.updateCurrentUser({ username }); } + /** + * If this user is a "self bot" or logged in using a normal user's details (which should be avoided), you can set the + * email here. + * @param {String} email the new email + * @returns {Promise} + * @example + * // set email + * client.store.user.setEmail('bob@gmail.com') + * .then(user => console.log(`My new email is ${user.email}`)) + * .catch(console.log); + */ setEmail(email) { return this.client.rest.methods.updateCurrentUser({ email }); } + /** + * If this user is a "self bot" or logged in using a normal user's details (which should be avoided), you can set the + * password here. + * @param {String} password the new password + * @returns {Promise} + * @example + * // set password + * client.store.user.setPassword('password') + * .then(user => console.log('New password set!')) + * .catch(console.log); + */ setPassword(password) { return this.client.rest.methods.updateCurrentUser({ password }); } - + /** + * Set the avatar of the logged in Client. + * @param {Base64Resolvable} avatar the new avatar + * @returns {Promise} + * @example + * // set avatar + * client.store.user.setAvatar(fs.readFileSync('./avatar.png')) + * .then(user => console.log(`New avatar set!`)) + * .catch(console.log); + */ setAvatar(avatar) { return this.client.rest.methods.updateCurrentUser({ avatar }); } diff --git a/src/structures/User.js b/src/structures/User.js index a487587e8..174fc931a 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -53,6 +53,13 @@ class User { this.game = data.game || this.game; } + /** + * When concatenated with a String, this automatically concatenates the User's mention instead of the User object. + * @returns {String} + * @example + * // logs: Hello from <@123456789>! + * console.log(`Hello from ${user}!`); + */ toString() { return `<@${this.id}>`; } From 22cdf0b258e227424c0a3484da64b2eeb550851c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 00:12:16 +0100 Subject: [PATCH 070/324] fix docs --- docs/docs.json | 2 +- src/structures/ClientUser.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 5c06239b0..abc89bc3b 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"meta":{"lineno":3,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":35,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":65,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":78,"filename":"ClientUser.js","path":"src/structures"},"order":14},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":115},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":116},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":117}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":15,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":108},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":109},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":110},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":111},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":112},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":113},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":114}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":15},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":51}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":57}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":58},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":74},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":75}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":60},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":63},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":64},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":65},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":66},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":67},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":68},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":69},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":70},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":71},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":72}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":76},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":86},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":87},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":88},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":93},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":94}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":82},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":83},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":84},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":85}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":95},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":96},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":104},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":105},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":106}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":97},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":98},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":99},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":100},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":101},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":102},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":103}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":107},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":114},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":115},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":116}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":107},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":108},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":109},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":110},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":111},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":112},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":113}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":57},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":74}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":60},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":63},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":64},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":65},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":66},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":67},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":68},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":69},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":70},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":71}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":75},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":85},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":86},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":87},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":88},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":93}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":76},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":82},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":83},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":84}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":94},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":95},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":103},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":104},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":105}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":96},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":97},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":98},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":99},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":100},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":101},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":102}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":106},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index b3b224d66..27915c4a1 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -2,7 +2,6 @@ const User = require('./User'); /** * Represents the logged in client's Discord User - * @class ClientUser * @extends {User} */ class ClientUser extends User { From bca3cc79158818f7690168419a8177fcfeb38bf4 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 00:16:51 +0100 Subject: [PATCH 071/324] work on getting started --- docs/custom/getting_started.js | 21 +++++++++++++++++++++ docs/docs.json | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/custom/getting_started.js b/docs/custom/getting_started.js index fcf5e1e0a..65d87c805 100644 --- a/docs/custom/getting_started.js +++ b/docs/custom/getting_started.js @@ -4,5 +4,26 @@ module.exports = { data: `# Welcome! discord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API. + +## Installation +To install discord.js from npm: +\`\`\`bash +npm i --save discord.js +\`\`\` + +To install discord.js from the master branch: +\`\`\`bash +npm i --save hydrabolt/discord.js +\`\`\` + +To install discord.js from the development branch: +\`\`\`bash +npm i --save hydrabolt/discord.js#indev +\`\`\` + +To install discord.js from the rewrite branch: +\`\`\`bash +npm i --save hydrabolt/discord.js#indev-rewrite +\`\`\` `, }; diff --git a/docs/docs.json b/docs/docs.json index abc89bc3b..09be1c06d 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":114},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":115},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":116}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":107},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":108},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":109},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":110},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":111},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":112},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":113}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":57},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":74}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":60},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":63},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":64},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":65},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":66},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":67},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":68},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":69},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":70},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":71}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":75},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":85},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":86},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":87},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":88},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":93}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":76},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":82},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":83},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":84}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":94},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":95},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":103},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":104},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":105}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":96},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":97},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":98},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":99},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":100},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":101},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":102}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":106},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":114},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":115},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":116}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":107},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":108},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":109},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":110},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":111},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":112},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":113}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":57},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":74}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":60},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":63},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":64},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":65},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":66},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":67},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":68},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":69},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":70},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":71}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":75},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":85},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":86},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":87},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":88},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":93}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":76},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":82},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":83},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":84}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":94},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":95},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":103},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":104},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":105}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":96},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":97},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":98},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":99},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":100},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":101},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":102}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":106},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file From 55630a38ac59ecb31a571205ee94d5e539adcb1c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 10:11:40 +0100 Subject: [PATCH 072/324] work on docs --- docs/docs.json | 2 +- src/client/Client.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 09be1c06d..095037b3e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":47,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":60,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":114},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":115},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":116}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":107},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":108},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":109},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":110},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":111},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":112},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":113}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":57},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":74}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":60},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":63},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":64},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":65},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":66},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":67},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":68},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":69},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":70},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":71}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":75},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":85},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":86},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":87},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":88},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":93}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":76},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":82},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":83},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":84}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":94},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":95},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":103},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":104},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":105}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":96},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":97},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":98},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":99},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":100},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":101},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":102}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":106},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided. If you're making a bot, it's much 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.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":62,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":114},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":115},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":116}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":107},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":108},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":109},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":110},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":111},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":112},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":113}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":57},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":74}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":60},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":63},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":64},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":65},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":66},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":67},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":68},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":69},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":70},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":71}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":75},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":85},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":86},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":87},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":88},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":93}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":76},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":82},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":83},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":84}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":94},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":95},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":103},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":104},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":105}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":96},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":97},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":98},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":99},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":100},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":101},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":102}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":106},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 111cc1314..a9bcddaaa 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -31,7 +31,9 @@ class Client extends EventEmitter { /** * Logs the client in. If successful, resolves with the account's token. * @param {string} emailOrToken The email or token used for the account. If it is an email, a password _must_ be - * provided. + * provided. If you're making a bot, it's much better to use a bot account rather than a user account. + * Bot accounts have higher rate limits and have access to some features user accounts don't have. User bots + * that are making a lot of API requests can even be banned. * @param {string} [password] The password for the account, only needed if an email was provided. * @return {Promise} * @example From 46e89f56c7f38003dd3045415efa5a5e96ceb0d7 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 10:13:00 +0100 Subject: [PATCH 073/324] work on docs --- docs/docs.json | 2 +- src/client/Client.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 095037b3e..950974bae 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided. If you're making a bot, it's much 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.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":62,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":114},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":115},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":116}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":107},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":108},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":109},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":110},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":111},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":112},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":113}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":57},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":74}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":60},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":63},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":64},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":65},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":66},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":67},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":68},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":69},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":70},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":71}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":75},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":85},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":86},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":87},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":88},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":93}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":76},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":82},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":83},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":84}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":94},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":95},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":103},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":104},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":105}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":96},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":97},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":98},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":99},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":100},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":101},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":102}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":106},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":114},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":115},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":116}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":107},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":108},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":109},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":110},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":111},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":112},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":113}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":57},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":74}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":60},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":63},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":64},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":65},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":66},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":67},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":68},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":69},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":70},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":71}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":75},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":85},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":86},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":87},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":88},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":93}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":76},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":82},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":83},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":84}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":94},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":95},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":103},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":104},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":105}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":96},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":97},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":98},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":99},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":100},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":101},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":102}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":106},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index a9bcddaaa..e1ea2a527 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -29,11 +29,12 @@ class Client extends EventEmitter { } /** - * Logs the client in. If successful, resolves with the account's token. - * @param {string} emailOrToken The email or token used for the account. If it is an email, a password _must_ be - * provided. If you're making a bot, it's much better to use a bot account rather than a user account. + * 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. * Bot accounts have higher rate limits and have access to some features user accounts don't have. User bots * that are making a lot of API requests can even be banned. + * @param {string} emailOrToken The email or token used for the account. If it is an email, a password _must_ be + * provided. * @param {string} [password] The password for the account, only needed if an email was provided. * @return {Promise} * @example From 159233059e9ceb7d8375e5bf7416a4830857b75f Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 10:27:31 +0100 Subject: [PATCH 074/324] Make ServerChannel GuildChannel --- src/structures/{ServerChannel.js => GuildChannel.js} | 4 ++-- src/structures/PermissionOverwrites.js | 4 ++-- src/structures/TextChannel.js | 4 ++-- src/structures/VoiceChannel.js | 4 ++-- src/structures/datastore/ClientDataStore.js | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) rename src/structures/{ServerChannel.js => GuildChannel.js} (98%) diff --git a/src/structures/ServerChannel.js b/src/structures/GuildChannel.js similarity index 98% rename from src/structures/ServerChannel.js rename to src/structures/GuildChannel.js index 563058220..5585d58a5 100644 --- a/src/structures/ServerChannel.js +++ b/src/structures/GuildChannel.js @@ -18,7 +18,7 @@ function arraysEqual(a, b) { return b.length === 0; } -class ServerChannel extends Channel { +class GuildChannel extends Channel { constructor(guild, data) { super(guild.client, data, guild); } @@ -146,4 +146,4 @@ class ServerChannel extends Channel { } } -module.exports = ServerChannel; +module.exports = GuildChannel; diff --git a/src/structures/PermissionOverwrites.js b/src/structures/PermissionOverwrites.js index 47177d3fc..08af23a3e 100644 --- a/src/structures/PermissionOverwrites.js +++ b/src/structures/PermissionOverwrites.js @@ -1,6 +1,6 @@ class PermissionOverwrites { - constructor(serverChannel, data) { - this.channel = serverChannel; + constructor(guildChannel, data) { + this.channel = guildChannel; if (data) { this.setup(data); } diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 6775e2989..6e364c1eb 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -1,11 +1,11 @@ -const ServerChannel = require('./ServerChannel'); +const GuildChannel = require('./GuildChannel'); const TextChannelDataStore = require('./datastore/TextChannelDataStore'); const TextBasedChannel = require('./interface/TextBasedChannel'); /** * Represents a Server Text Channel on Discord. */ -class TextChannel extends ServerChannel { +class TextChannel extends GuildChannel { constructor(guild, data) { super(guild, data); diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index 8e01ebfc1..1eb0d0718 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -1,10 +1,10 @@ -const ServerChannel = require('./ServerChannel'); +const GuildChannel = require('./GuildChannel'); const VoiceChannelDataStore = require('./datastore/VoiceChannelDataStore'); /** * Represents a Server Voice Channel on Discord. */ -class VoiceChannel extends ServerChannel { +class VoiceChannel extends GuildChannel { constructor(guild, data) { super(guild, data); this.store = new VoiceChannelDataStore(); diff --git a/src/structures/datastore/ClientDataStore.js b/src/structures/datastore/ClientDataStore.js index b62e97af5..8c170994e 100644 --- a/src/structures/datastore/ClientDataStore.js +++ b/src/structures/datastore/ClientDataStore.js @@ -6,7 +6,7 @@ const User = require('../User'); const DMChannel = require('../DMChannel'); const TextChannel = require('../TextChannel'); const VoiceChannel = require('../VoiceChannel'); -const ServerChannel = require('../ServerChannel'); +const GuildChannel = require('../GuildChannel'); class ClientDataStore extends AbstractDataStore { constructor(client) { @@ -85,7 +85,7 @@ class ClientDataStore extends AbstractDataStore { killChannel(channel) { this.remove('channels', channel); - if (channel instanceof ServerChannel) { + if (channel instanceof GuildChannel) { channel.guild.store.remove('channels', channel); } } From 45f897fbe7dcb6666f4c1a9eff3203fafd6bf7bd Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 10:46:02 +0100 Subject: [PATCH 075/324] write some docs --- src/structures/GuildChannel.js | 80 ++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 5585d58a5..1fb91b024 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -18,6 +18,10 @@ function arraysEqual(a, b) { return b.length === 0; } +/** + * Represents a Guild Channel (i.e. Text Channels and Voice Channels) + * @extends {Channel} + */ class GuildChannel extends Channel { constructor(guild, data) { super(guild.client, data, guild); @@ -25,12 +29,36 @@ class GuildChannel extends Channel { setup(data) { super.setup(data); + /** + * The type of the Guild Channel + * @type {Number} + */ this.type = data.type; + /** + * The topic of the Guild Channel, if there is one. + * @type {?String} + */ this.topic = data.topic; + /** + * The position of the channel in the list. + * @type {Number} + */ this.position = data.position; + /** + * The name of the Guild Channel + * @type {String} + */ this.name = data.name; + /** + * The ID of the last message in the channel, if one was sent. + * @type {?String} + */ this.lastMessageID = data.last_message_id; this.ow = data.permission_overwrites; + /** + * A list of permission overwrites in this channel for roles and users. + * @type {Array} + */ this.permissionOverwrites = []; if (data.permission_overwrites) { for (const overwrite of data.permission_overwrites) { @@ -39,6 +67,12 @@ class GuildChannel extends Channel { } } + /** + * Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel. + * In most cases, a simple `channel.id === channel2.id` will do, and is much faster too. + * @param {GuildChannel} channel the channel to compare this channel to + * @returns {Boolean} + */ equals(other) { let base = ( this.type === other.type && @@ -65,6 +99,12 @@ class GuildChannel extends Channel { return base; } + /** + * Gets the overall set of permissions for a user in this channel, taking into account roles and permission + * overwrites. + * @param {GuildMemberResolvable} member the user that you want to obtain the overall permissions for + * @returns {?EvaluatedPermissions} + */ permissionsFor(member) { member = this.client.resolver.resolveGuildMember(this.guild, member); if (member) { @@ -125,14 +165,44 @@ class GuildChannel extends Channel { return this.client.rest.methods.updateChannel(this, data); } + /** + * Set a new name for the Guild Channel + * @param {String} name the new name for the guild channel + * @returns {Promise} + * @example + * // set a new channel name + * channel.setName('not general') + * .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`)) + * .catch(console.log); + */ setName(name) { return this.client.rest.methods.updateChannel(this, { name }); } + /** + * Set a new position for the Guild Channel + * @param {Number} position the new position for the guild channel + * @returns {Promise} + * @example + * // set a new channel position + * channel.setPosition(2) + * .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`)) + * .catch(console.log); + */ setPosition(position) { return this.rest.client.rest.methods.updateChannel(this, { position }); } + /** + * Set a new topic for the Guild Channel + * @param {String} topic the new topic for the guild channel + * @returns {Promise} + * @example + * // set a new channel topic + * channel.setTopic('needs more rate limiting') + * .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`)) + * .catch(console.log); + */ setTopic(topic) { return this.rest.client.rest.methods.updateChannel(this, { topic }); } @@ -141,6 +211,16 @@ class GuildChannel extends Channel { return this.rest.client.rest.methods.updateChannel(this, { bitrate }); } + /** + * When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object. + * @returns {String} + * @example + * // Outputs: Hello from general + * console.log(`Hello from ${channel}`); + * @example + * // Outputs: Hello from general + * console.log('Hello from ' + ${channel}); + */ toString() { return this.name; } From a5fd46d306de4ec3b0c2bd77764982e4a94f40b4 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 10:48:09 +0100 Subject: [PATCH 076/324] write MORE docs --- docs/docs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 950974bae..ce16bbeb2 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":114},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":115},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":116}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":107},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":108},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":109},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":110},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":111},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":112},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":113}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":57},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":74}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":58},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":59},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":60},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":61},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":62},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":63},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":64},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":65},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":66},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":67},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":68},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":69},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":70},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":71}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":75},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":85},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":86},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":87},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":88},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":93}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":76},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":77},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":78},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":79},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":80},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":81},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":82},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":83},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":84}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":94},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":95},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":103},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":104},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":105}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":96},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":97},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":98},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":99},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":100},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":101},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":102}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":106},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":127},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":128},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":129}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":120},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":121},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":122},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":123},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":124},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":125},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":126}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":132}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":130},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":131}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":70},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":85},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":86},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":87}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":71},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":74},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":75},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":76},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":77},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":78},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":79},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":80},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":81},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":82},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":83},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":84}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":88},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":98},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":99},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":100},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":101},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":102},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":103},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":104},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":105},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":106}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":93},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":94},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":95},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":96},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":97}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":107},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":108},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":116},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":117},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":118}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":109},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":110},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":111},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":112},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":113},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":114},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":115}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":119},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file From 4d4258b4e204f9461f2981bce9f75424becf4207 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 12:18:57 +0100 Subject: [PATCH 077/324] modify text/voice channels to show extensio from GuildChannel --- docs/docs.json | 2 +- src/structures/TextChannel.js | 1 + src/structures/VoiceChannel.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index ce16bbeb2..7956608c7 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":127},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":128},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":129}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":120},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":121},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":122},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":123},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":124},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":125},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":126}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":132}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":130},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":131}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":70},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":85},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":86},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":87}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":71},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":74},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":75},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":76},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":77},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":78},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":79},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":80},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":81},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":82},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":83},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":84}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":88},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":98},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":99},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":100},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":101},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":102},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":103},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":104},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":105},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":106}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":93},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":94},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":95},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":96},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":97}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","description":"Represents a Server Text Channel on Discord.","meta":{"lineno":8,"filename":"TextChannel.js","path":"src/structures"},"order":107},"functions":[],"properties":[],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":108},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":116},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":117},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":118}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":109},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":110},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":111},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":112},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":113},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":114},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":115}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":119},"functions":[],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":127},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":128},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":129}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":120},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":121},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":122},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":123},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":124},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":125},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":126}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":132}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":130},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":131}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":70},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":85},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":86},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":87}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":71},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":74},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":75},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":76},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":77},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":78},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":79},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":80},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":81},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":82},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":83},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":84}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":88},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":98},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":99},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":100},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":101},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":102},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":103},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":104},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":105},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":106}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":93},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":94},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":95},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":96},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":97}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":107},"functions":[{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":139},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":140},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":141},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":142},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":143},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":144},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":147}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":133},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":134},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":135},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":136},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":137},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":138},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":145},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":146}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":108},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":116},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":117},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":118}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":109},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":110},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":111},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":112},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":113},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":114},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":115}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":119},"functions":[{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":154},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":155},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":156},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":157},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":158},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":159},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":162}],"properties":[{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":148},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":149},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":150},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":151},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":152},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":153},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":160},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":161}],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 6e364c1eb..f98594965 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -4,6 +4,7 @@ const TextBasedChannel = require('./interface/TextBasedChannel'); /** * Represents a Server Text Channel on Discord. + * @extends {GuildChannel} */ class TextChannel extends GuildChannel { diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index 1eb0d0718..17e55e238 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -3,6 +3,7 @@ const VoiceChannelDataStore = require('./datastore/VoiceChannelDataStore'); /** * Represents a Server Voice Channel on Discord. + * @extends {GuildChannel} */ class VoiceChannel extends GuildChannel { constructor(guild, data) { From 18299970bd23aef6c5966203899751279b125175 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 13:07:42 +0100 Subject: [PATCH 078/324] Updated to docs format v3, adds support for interfaces --- docs/docs.json | 2 +- docs/gen/index.js | 19 ++++++--- package.json | 2 +- src/structures/TextChannel.js | 1 + src/structures/User.js | 5 +++ src/structures/interface/TextBasedChannel.js | 43 +++++++++++++++++--- 6 files changed, 59 insertions(+), 13 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 7956608c7..fd24ba362 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":127},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":128},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":129}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":120},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":121},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":122},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":123},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":124},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":125},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":126}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":132}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":130},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":131}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":70},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":85},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":86},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":87}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":71},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":74},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":75},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":76},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":77},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":78},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":79},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":80},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":81},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":82},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":83},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":84}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":88},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":98},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":99},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":100},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":101},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":102},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":103},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":104},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":105},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":106}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":93},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":94},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":95},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":96},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":97}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":107},"functions":[{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":139},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":140},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":141},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":142},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":143},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":144},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":147}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":133},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":134},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":135},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":136},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":137},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":138},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":145},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":146}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":108},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":116},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":117},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":118}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":109},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":110},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":111},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":112},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":113},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":114},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":115}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":119},"functions":[{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":154},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":155},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":156},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":157},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":158},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":159},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":162}],"properties":[{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":148},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":149},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":150},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":151},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":152},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":153},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":160},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":161}],"events":[]}}}} \ No newline at end of file +{"meta":{"version":3},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":131},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":132},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":133},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":134}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":124},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":125},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":126},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":127},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":128},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":129},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":130}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":137}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":135},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":136}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":70},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":85},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":86},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":87}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":71},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":74},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":75},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":76},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":77},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":78},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":79},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":80},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":81},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":82},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":83},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":84}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":88},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":98},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":99},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":100},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":101},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":102},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":103},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":104},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":105},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":106}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":93},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":94},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":95},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":96},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":97}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":107},"functions":[{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":144},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":145},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":146},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":147},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":148},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":149},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":152}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":138},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":139},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":140},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":141},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":142},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":143},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":150},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":151}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":108},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":116},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":117},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":118},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":123}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":109},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":110},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":111},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":112},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":113},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":114},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":115}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":119},"functions":[{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":159},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":160},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":161},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":162},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":163},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":164},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":167}],"properties":[{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":153},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":154},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":155},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":156},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":157},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":158},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":165},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":166}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":120},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":121},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":122}],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js index a12185e5a..307c237c6 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -4,7 +4,7 @@ let parse; const customDocs = require('../custom/index'); -const GEN_VERSION = 2; +const GEN_VERSION = 3; try { fs = require('fs-extra'); @@ -20,7 +20,7 @@ console.log('Starting...'); let json = ''; const stream = parse({ - src: ['./src/*.js', './src/*/*.js'], + src: ['./src/*.js', './src/*/*.js', './src/**/*.js'], }); const cwd = (`${process.cwd()}\\`).replace(/\\/g, '/'); @@ -36,6 +36,7 @@ function cleanPaths() { function clean() { const cleaned = { classes: {}, + interfaces: {}, }; for (const item of json) { if (item.kind === 'class') { @@ -45,10 +46,19 @@ function clean() { properties: [], events: [], }; + } else if (item.kind === 'interface') { + cleaned.interfaces[item.longname] = { + meta: item, + functions: [], + properties: [], + events: [], + }; } else if (item.kind === 'member') { - cleaned.classes[item.memberof].properties.push(item); + const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; + obj.properties.push(item); } else if (item.kind === 'function' && item.memberof) { - cleaned.classes[item.memberof].functions.push(item); + const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; + obj.functions.push(item); } } json = cleaned; @@ -58,7 +68,6 @@ function next() { json = JSON.parse(json); cleanPaths(); console.log('parsed inline code'); - console.log(json); clean(); json = { meta: { diff --git a/package.json b/package.json index 64bc6e480..0cb8e060c 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "A way to interface with the Discord API", "main": "./src/index", "scripts": { - "test": "node test/random", + "test": "eslint src/ && node test/random", "docs": "node docs/gen/index.js" }, "repository": { diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index f98594965..603fba181 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -5,6 +5,7 @@ const TextBasedChannel = require('./interface/TextBasedChannel'); /** * Represents a Server Text Channel on Discord. * @extends {GuildChannel} + * @implements {TextBasedChannel} */ class TextChannel extends GuildChannel { diff --git a/src/structures/User.js b/src/structures/User.js index 174fc931a..448e4c33a 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -2,6 +2,7 @@ const TextBasedChannel = require('./interface/TextBasedChannel'); /** * Represents a User on Discord. + * @implements {TextBasedChannel} */ class User { constructor(client, data) { @@ -99,6 +100,10 @@ class User { return base; } + + sendMessage() { + return; + } } TextBasedChannel.applyToClass(User); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 1eb44ca90..974a4d432 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -1,12 +1,43 @@ -function sendMessage(content, options = {}) { - return this.client.rest.methods.sendMessage(this, content, options.tts); +/** + * Interface for classes that have text-channel-like features + * @interface + */ +class TextBasedChannel { + /** + * Send a message to this channel + * @param {String} content the content to send + * @param {MessageOptions} [options={}] the options to provide + * @returns {Promise} + * @example + * // send a message + * channel.sendMessage('hello!') + * .then(message => console.log(`Sent message: ${message.content}`)) + * .catch(console.log); + */ + sendMessage(content, options = {}) { + return this.client.rest.methods.sendMessage(this, content, options.tts); + } + /** + * Send a text-to-speech message to this channel + * @param {String} content the content to send + * @returns {Promise} + * @example + * // send a TTS message + * channel.sendTTSMessage('hello!') + * .then(message => console.log(`Sent tts message: ${message.content}`)) + * .catch(console.log); + */ + sendTTSMessage(content) { + return this.client.rest.methods.sendMessage(this, content, true); + } } -function sendTTSMessage(content) { - return this.client.rest.methods.sendMessage(this, content, true); +function applyProp(structure, prop) { + structure.prototype[prop] = TextBasedChannel.prototype[prop]; } exports.applyToClass = structure => { - structure.prototype.sendMessage = sendMessage; - structure.prototype.sendTTSMessage = sendTTSMessage; + for (const prop of ['sendMessage', 'sendTTSMessage']) { + applyProp(structure, prop); + } }; From be7b0fb5caba91a681f0b17afe8883fb9da66504 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 13:13:31 +0100 Subject: [PATCH 079/324] Fix blank methods for user and textchannel --- docs/docs.json | 2 +- src/structures/TextChannel.js | 8 ++++++++ src/structures/User.js | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index fd24ba362..d4063d635 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":3},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":131},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":132},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":133},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":134}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":124},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":125},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":126},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":127},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":128},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":129},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":130}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":137}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":135},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":136}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":70},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":85},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":86},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":87}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":71},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":74},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":75},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":76},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":77},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":78},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":79},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":80},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":81},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":82},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":83},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":84}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":88},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":98},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":99},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":100},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":101},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":102},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":103},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":104},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":105},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":106}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":93},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":94},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":95},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":96},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":97}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":107},"functions":[{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":144},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":145},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":146},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":147},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":148},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":149},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":152}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":138},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":139},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":140},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":141},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":142},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":143},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":150},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":151}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":108},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":116},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":117},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":118},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":123}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":109},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":110},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":111},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":112},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":113},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":114},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":115}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":119},"functions":[{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":159},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":160},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":161},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":162},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":163},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":164},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":167}],"properties":[{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":153},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":154},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":155},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":156},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":157},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":158},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":165},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":166}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":120},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":121},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":122}],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":3},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":134},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":135},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":136},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":137},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":138}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":127},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":128},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":129},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":130},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":131},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":132},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":133}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":141}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":139},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":140}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":70},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":85},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":86},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":87}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":71},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":74},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":75},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":76},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":77},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":78},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":79},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":80},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":81},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":82},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":83},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":84}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":88},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":98},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":99},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":100},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":101},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":102},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":103},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":104},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":105},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":106}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":93},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":94},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":95},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":96},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":97}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":107},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":125},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":126},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":148},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":149},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":150},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":151},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":152},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":153},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":156}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":142},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":143},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":144},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":145},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":146},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":147},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":154},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":155}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":108},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":116},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":117},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":118},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":123},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":124}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":109},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":110},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":111},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":112},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":113},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":114},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":115}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":119},"functions":[{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":163},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":164},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":165},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":166},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":171}],"properties":[{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":157},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":158},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":159},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":160},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":161},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":162},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":170}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":120},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":121},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":122}],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 603fba181..5762ef5a9 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -28,6 +28,14 @@ class TextChannel extends GuildChannel { return this.store.add('messages', message); } + + sendMessage() { + return; + } + + sendTTSMessage() { + return; + } } TextBasedChannel.applyToClass(TextChannel); diff --git a/src/structures/User.js b/src/structures/User.js index 448e4c33a..3fc94e2a9 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -104,6 +104,10 @@ class User { sendMessage() { return; } + + sendTTSMessage() { + return; + } } TextBasedChannel.applyToClass(User); From 0ac66287d7d0e27d8c91eb2b437ccbc710c67106 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 13:16:44 +0100 Subject: [PATCH 080/324] Fix logo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e05bbbea..4384e9814 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- discord.js
+ discord.js

REWRITE

\ No newline at end of file From 3d3766f1294a13cfbe6937bbd5002bfefaabfb6b Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 13:22:32 +0100 Subject: [PATCH 081/324] do more docs --- docs/docs.json | 2 +- src/structures/GuildChannel.js | 4 ---- src/structures/GuildMember.js | 12 ++++++++++++ src/structures/VoiceChannel.js | 22 ++++++++++++++++++++++ 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index d4063d635..e7cc5c49d 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":3},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":134},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":135},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":136},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":137},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":138}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":127},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":128},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":129},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":130},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":131},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":132},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":133}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":141}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":139},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":140}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":70},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":85},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":86},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":87}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":71},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":74},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":75},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":76},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":77},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":78},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":79},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":80},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":81},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":82},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":83},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":84}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":88},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":98},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":99},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":100},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":101},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":102},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":103},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":104},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":105},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":106}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":93},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":94},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":95},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":96},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":97}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":107},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":125},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":126},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":148},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":149},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":150},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":151},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":152},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":153},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":156}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":142},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":143},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":144},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":145},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":146},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":147},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":154},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":155}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":108},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":116},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":117},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":118},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":123},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":124}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":109},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":110},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":111},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":112},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":113},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":114},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":115}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":119},"functions":[{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":163},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":164},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":165},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":166},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":171}],"properties":[{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":157},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":158},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":159},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":160},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":161},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":162},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":170}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":120},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":121},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":122}],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":3},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":140},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":141},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":142},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":143},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":144}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":133},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":134},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":135},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":136},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":137},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":138},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":139}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":147}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":145},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":146}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":70},"functions":[{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":129},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":130}],"properties":[],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":71},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":86},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":87},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":88}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":74},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":75},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":76},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":77},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":78},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":79},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":80},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":81},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":82},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":83},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":84},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":85}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":89},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":99},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":100},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":101},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":102},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":103},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":104},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":105},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":106},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":107}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":93},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":94},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":95},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":96},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":97},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":98}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":108},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":131},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":132},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":154},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":155},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":156},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":157},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":158},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":159},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":162}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":148},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":149},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":150},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":151},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":152},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":153},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":160},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":161}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":109},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":117},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":118},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":119},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":127},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":128}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":110},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":111},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":112},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":113},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":114},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":115},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":116}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":120},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":123},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":170},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":171},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":172},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":173},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":174},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":177}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":121},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":122},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":163},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":164},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":165},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":166},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":175},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":176}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":124},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":125},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":126}],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 1fb91b024..a9779fe2c 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -207,10 +207,6 @@ class GuildChannel extends Channel { return this.rest.client.rest.methods.updateChannel(this, { topic }); } - setBitrate(bitrate) { - return this.rest.client.rest.methods.updateChannel(this, { bitrate }); - } - /** * When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object. * @returns {String} diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 6c1b11afc..1c7ce9830 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -1,5 +1,9 @@ const TextBasedChannel = require('./interface/TextBasedChannel'); +/** + * Represents a Member of a Guild on Discord + * @implements {TextBasedChannel} + */ class GuildMember { constructor(guild, data) { this.client = guild.client; @@ -64,6 +68,14 @@ class GuildMember { kick() { return this.client.rest.methods.kickGuildMember(this.guild, this); } + + sendMessage() { + return; + } + + sendTTSMessage() { + return; + } } TextBasedChannel.applyToClass(GuildMember); diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index 17e55e238..41c36c519 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -13,9 +13,31 @@ class VoiceChannel extends GuildChannel { setup(data) { super.setup(data); + /** + * The bitrate of this voice channel + * @type {Number} + */ this.bitrate = data.bitrate; + /** + * The maximum amount of users allowed in this channel - 0 means unlimited. + * @type {Number} + */ this.userLimit = data.user_limit; } + + /** + * Sets the bitrate of the channel + * @param {Number} bitrate the new bitrate + * @returns {Promise} + * @example + * // set the bitrate of a voice channel + * voiceChannel.setBitrate(48000) + * .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`)) + * .catch(console.log); + */ + setBitrate(bitrate) { + return this.rest.client.rest.methods.updateChannel(this, { bitrate }); + } } module.exports = VoiceChannel; From 3ac191a8125841c76665789c27611209f339ff7a Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 13:30:20 +0100 Subject: [PATCH 082/324] add (incomplete) docs for guildmember --- docs/docs.json | 2 +- src/structures/GuildMember.js | 73 +++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index e7cc5c49d..91b7c6f20 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":3},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":140},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":141},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":142},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":143},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":144}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":133},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":134},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":135},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":136},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":137},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":138},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":139}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":147}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":145},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":146}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":70},"functions":[{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":129},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":130}],"properties":[],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":71},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":86},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":87},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":88}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":74},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":75},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":76},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":77},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":78},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":79},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":80},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":81},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":82},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":83},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":84},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":85}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":89},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":99},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":100},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":101},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":102},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":103},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":104},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":105},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":106},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":107}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":93},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":94},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":95},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":96},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":97},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":98}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":108},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":131},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":132},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":154},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":155},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":156},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":157},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":158},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":159},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":162}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":148},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":149},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":150},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":151},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":152},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":153},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":160},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":161}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":109},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":117},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":118},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":119},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":127},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":128}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":110},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":111},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":112},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":113},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":114},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":115},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":116}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":120},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":123},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":170},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":171},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":172},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":173},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":174},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":177}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":121},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":122},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":163},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":164},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":165},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":166},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":175},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":176}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":124},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":125},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":126}],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":3},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":157},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":158},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":159},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":160},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":161}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":150},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":151},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":152},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":153},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":154},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":155},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":156}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":164}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":162},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":163}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":70},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":146},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":147}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"names":["Client"]},"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":71},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":{"names":["Guild"]},"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":72},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"names":["User"]},"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":73},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":74},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":75},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":76},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":77},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":78},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":79},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":{"names":["Date"]},"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":80},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":81},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":{"names":["VoiceChannel"]},"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":{"names":["String"]},"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":85}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":88},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":105}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":89},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":90},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":91},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":92},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":93},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":94},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":95},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":96},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":97},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":98},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":99},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":102}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":106},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":116},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":117},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":118},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":119},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":120},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":121},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":124}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":107},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":108},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":109},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":110},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":111},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":112},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":113},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":114},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":115}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":125},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":148},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":149},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":171},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":172},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":173},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":174},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":175},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":176},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":179}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":165},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":166},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":167},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":168},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":169},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":170},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":177},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":178}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":126},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":134},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":135},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":136},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":144},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":145}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":127},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":128},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":129},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":130},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":131},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":132},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":133}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":137},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":140},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":194}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":138},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":139},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":180},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":181},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":182},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":183},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":184},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":192},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":193}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":141},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":142},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":143}],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 1c7ce9830..20e03cd33 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -6,8 +6,20 @@ const TextBasedChannel = require('./interface/TextBasedChannel'); */ class GuildMember { constructor(guild, data) { + /** + * The client that instantiated this GuildMember + * @type {Client} + */ this.client = guild.client; + /** + * The guild that this member is part of + * @type {Guild} + */ this.guild = guild; + /** + * The user that this guild member instance Represents + * @type {User} + */ this.user = {}; this._roles = []; if (data) { @@ -17,16 +29,49 @@ class GuildMember { setup(data) { this.user = data.user; + /** + * Whether this member is deafened server-wide + * @type {Boolean} + */ this.serverDeaf = data.deaf; + /** + * Whether this member is muted server-wide + * @type {Boolean} + */ this.serverMute = data.mute; + /** + * Whether this member is self-muted + * @type {Boolean} + */ this.selfMute = data.self_mute; + /** + * Whether this member is self-deafened + * @type {Boolean} + */ this.selfDeaf = data.self_deaf; + /** + * The voice session ID of this member, if any + * @type {?String} + */ this.voiceSessionID = data.session_id; + /** + * The voice channel ID of this member, if any + * @type {?String} + */ this.voiceChannelID = data.channel_id; + /** + * The date this member joined the guild + * @type {Date} + */ this.joinDate = new Date(data.joined_at); this._roles = data.roles; } + /** + * A list of roles that are applied to this GuildMember + * @type {Array} + * @readonly + */ get roles() { const list = []; const everyoneRole = this.guild.store.get('roles', this.guild.id); @@ -45,26 +90,54 @@ class GuildMember { return list; } + /** + * Whether this member is muted in any way + * @type {Boolean} + * @readonly + */ get mute() { return this.selfMute || this.serverMute; } + /** + * Whether this member is deafened in any way + * @type {Boolean} + * @readonly + */ get deaf() { return this.selfDeaf || this.serverDeaf; } + /** + * The voice channel this member is in, if any + * @type {?VoiceChannel} + * @readonly + */ get voiceChannel() { return this.guild.store.get('channels', this.voiceChannelID); } + /** + * The ID of this User + * @type {String} + * @readonly + */ get id() { return this.user.id; } + /** + * Deletes any DM's with this Guild Member + * @returns {Promise} + */ deleteDM() { return this.client.rest.methods.deleteChannel(this); } + /** + * Kick this member from the Guild + * @returns {Promise} + */ kick() { return this.client.rest.methods.kickGuildMember(this.guild, this); } From 839ff5ce4381cfb194b4af4d9b4e2b82bfeef92f Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 13:33:02 +0100 Subject: [PATCH 083/324] Docs for permissionoverwrites --- docs/docs.json | 2 +- src/structures/PermissionOverwrites.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 91b7c6f20..300179762 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":3},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":157},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":158},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":159},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":160},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":161}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":150},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":151},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":152},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":153},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":154},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":155},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":156}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":164}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":162},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":163}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":70},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":146},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":147}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"names":["Client"]},"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":71},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":{"names":["Guild"]},"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":72},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"names":["User"]},"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":73},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":74},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":75},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":76},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":77},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":78},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":79},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":{"names":["Date"]},"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":80},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":81},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":{"names":["VoiceChannel"]},"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":{"names":["String"]},"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":85}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":88},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":105}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":89},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":90},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":91},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":92},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":93},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":94},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":95},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":96},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":97},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":98},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":99},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":102}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":106},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":116},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":117},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":118},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":119},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":120},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":121},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":124}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":107},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":108},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":109},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":110},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":111},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":112},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":113},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":114},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":115}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":125},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":148},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":149},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":171},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":172},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":173},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":174},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":175},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":176},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":179}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":165},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":166},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":167},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":168},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":169},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":170},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":177},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":178}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":126},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":134},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":135},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":136},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":144},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":145}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":127},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":128},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":129},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":130},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":131},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":132},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":133}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":137},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":140},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":194}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":138},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":139},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":180},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":181},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":182},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":183},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":184},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":192},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":193}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":141},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":142},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":143}],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":3},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":161},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":162},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":163},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":154},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":155},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":156},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":157},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":158},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":159},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":160}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":168}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":166},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":167}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":70},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":150},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":151}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"names":["Client"]},"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":71},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":{"names":["Guild"]},"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":72},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"names":["User"]},"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":73},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":74},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":75},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":76},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":77},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":78},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":79},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":{"names":["Date"]},"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":80},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":81},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":{"names":["VoiceChannel"]},"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":{"names":["String"]},"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":85}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":88},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":105}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":89},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":90},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":91},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":92},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":93},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":94},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":95},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":96},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":97},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":98},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":99},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":102}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":106},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"names":["GuildChannel"]},"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":107},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"names":["String"]},"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":108},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"names":["String"]},"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":109}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":110},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":120},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":121},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":128}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":111},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":112},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":113},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":114},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":115},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":116},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":117},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":118},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":119}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":129},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":152},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":153},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":175},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":176},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":177},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":178},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":179},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":180},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":183}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":169},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":170},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":171},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":172},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":173},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":174},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":181},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":182}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":130},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":138},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":139},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":140},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":148},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":149}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":131},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":132},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":133},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":134},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":135},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":136},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":137}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":141},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":144},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":198}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":142},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":143},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":184},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":196},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":197}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":145},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":146},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":147}],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/PermissionOverwrites.js b/src/structures/PermissionOverwrites.js index 08af23a3e..24851a96c 100644 --- a/src/structures/PermissionOverwrites.js +++ b/src/structures/PermissionOverwrites.js @@ -1,5 +1,12 @@ +/** + * Represents a permission overwrite for a Role or Member in a Guild Channel. + */ class PermissionOverwrites { constructor(guildChannel, data) { + /** + * The GuildChannel this overwrite is for + * @type {GuildChannel} + */ this.channel = guildChannel; if (data) { this.setup(data); @@ -7,7 +14,15 @@ class PermissionOverwrites { } setup(data) { + /** + * The type of this overwrite + * @type {String} + */ this.type = data.type; + /** + * The ID of this overwrite, either a User ID or a Role ID + * @type {String} + */ this.id = data.id; this.denyData = data.deny; this.allowData = data.allow; From 21c465470523e256fa7fb5564596c74871e81a87 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 16:07:52 +0100 Subject: [PATCH 084/324] Update getting started to include evie's tutorial --- docs/custom/getting_started.js | 4 ++++ docs/docs.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/custom/getting_started.js b/docs/custom/getting_started.js index 65d87c805..0422cd745 100644 --- a/docs/custom/getting_started.js +++ b/docs/custom/getting_started.js @@ -25,5 +25,9 @@ To install discord.js from the rewrite branch: \`\`\`bash npm i --save hydrabolt/discord.js#indev-rewrite \`\`\` + +## Tutorials +LuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js. +It's worth a read and you can find it [here.](LuckyEvie#4611) `, }; diff --git a/docs/docs.json b/docs/docs.json index 300179762..f69bb0a6e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":3},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":161},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":162},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":163},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":154},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":155},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":156},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":157},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":158},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":159},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":160}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":168}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":166},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":167}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":70},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":150},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":151}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"names":["Client"]},"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":71},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":{"names":["Guild"]},"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":72},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"names":["User"]},"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":73},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":74},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":75},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":76},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":77},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":78},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":79},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":{"names":["Date"]},"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":80},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":81},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":{"names":["VoiceChannel"]},"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":{"names":["String"]},"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":85}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":88},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":105}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":89},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":90},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":91},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":92},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":93},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":94},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":95},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":96},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":97},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":98},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":99},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":102}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":106},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"names":["GuildChannel"]},"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":107},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"names":["String"]},"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":108},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"names":["String"]},"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":109}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":110},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":120},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":121},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":128}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":111},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":112},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":113},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":114},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":115},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":116},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":117},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":118},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":119}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":129},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":152},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":153},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":175},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":176},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":177},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":178},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":179},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":180},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":183}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":169},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":170},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":171},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":172},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":173},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":174},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":181},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":182}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":130},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":138},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":139},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":140},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":148},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":149}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":131},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":132},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":133},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":134},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":135},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":136},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":137}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":141},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":144},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":198}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":142},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":143},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":184},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":196},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":197}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":145},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":146},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":147}],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":3},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](LuckyEvie#4611)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":161},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":162},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":163},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":154},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":155},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":156},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":157},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":158},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":159},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":160}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":168}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":166},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":167}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":70},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":150},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":151}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"names":["Client"]},"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":71},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":{"names":["Guild"]},"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":72},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"names":["User"]},"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":73},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":74},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":75},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":76},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":77},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":78},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":79},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":{"names":["Date"]},"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":80},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":81},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":{"names":["VoiceChannel"]},"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":{"names":["String"]},"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":85}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":88},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":105}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":89},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":90},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":91},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":92},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":93},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":94},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":95},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":96},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":97},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":98},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":99},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":102}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":106},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"names":["GuildChannel"]},"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":107},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"names":["String"]},"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":108},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"names":["String"]},"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":109}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":110},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":120},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":121},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":128}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":111},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":112},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":113},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":114},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":115},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":116},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":117},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":118},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":119}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":129},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":152},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":153},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":175},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":176},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":177},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":178},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":179},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":180},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":183}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":169},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":170},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":171},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":172},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":173},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":174},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":181},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":182}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":130},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":138},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":139},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":140},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":148},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":149}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":131},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":132},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":133},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":134},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":135},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":136},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":137}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":141},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":144},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":198}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":142},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":143},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":184},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":196},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":197}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":145},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":146},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":147}],"properties":[],"events":[]}}}} \ No newline at end of file From 6f9f1038217ca5c32b6a98cd82bda98688be4ee0 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 16:09:15 +0100 Subject: [PATCH 085/324] Fix the URL link god damn it hydra --- docs/custom/getting_started.js | 2 +- docs/docs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/custom/getting_started.js b/docs/custom/getting_started.js index 0422cd745..3dc7a00d8 100644 --- a/docs/custom/getting_started.js +++ b/docs/custom/getting_started.js @@ -28,6 +28,6 @@ npm i --save hydrabolt/discord.js#indev-rewrite ## Tutorials LuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js. -It's worth a read and you can find it [here.](LuckyEvie#4611) +It's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html) `, }; diff --git a/docs/docs.json b/docs/docs.json index f69bb0a6e..d74dd1394 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":3},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](LuckyEvie#4611)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":161},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":162},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":163},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":154},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":155},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":156},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":157},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":158},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":159},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":160}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":168}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":166},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":167}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":70},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":150},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":151}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"names":["Client"]},"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":71},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":{"names":["Guild"]},"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":72},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"names":["User"]},"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":73},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":74},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":75},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":76},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":77},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":78},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":79},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":{"names":["Date"]},"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":80},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":81},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":{"names":["VoiceChannel"]},"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":{"names":["String"]},"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":85}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":88},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":105}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":89},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":90},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":91},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":92},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":93},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":94},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":95},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":96},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":97},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":98},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":99},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":102}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":106},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"names":["GuildChannel"]},"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":107},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"names":["String"]},"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":108},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"names":["String"]},"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":109}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":110},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":120},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":121},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":128}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":111},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":112},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":113},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":114},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":115},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":116},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":117},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":118},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":119}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":129},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":152},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":153},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":175},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":176},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":177},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":178},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":179},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":180},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":183}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":169},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":170},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":171},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":172},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":173},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":174},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":181},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":182}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":130},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":138},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":139},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":140},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":148},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":149}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":131},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":132},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":133},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":134},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":135},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":136},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":137}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":141},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":144},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":198}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":142},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":143},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":184},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":196},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":197}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":145},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":146},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":147}],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":3},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":161},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":162},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":163},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":154},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":155},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":156},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":157},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":158},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":159},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":160}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":168}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":166},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":167}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":70},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":150},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":151}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"names":["Client"]},"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":71},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":{"names":["Guild"]},"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":72},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"names":["User"]},"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":73},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":74},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":75},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":76},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":77},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":78},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":79},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":{"names":["Date"]},"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":80},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":81},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":{"names":["VoiceChannel"]},"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":{"names":["String"]},"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":85}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":88},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":105}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":89},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":90},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":91},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":92},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":93},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":94},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":95},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":96},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":97},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":98},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":99},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":102}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":106},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"names":["GuildChannel"]},"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":107},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"names":["String"]},"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":108},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"names":["String"]},"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":109}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":110},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":120},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":121},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":128}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":111},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":112},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":113},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":114},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":115},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":116},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":117},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":118},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":119}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":129},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":152},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":153},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":175},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":176},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":177},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":178},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":179},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":180},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":183}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":169},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":170},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":171},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":172},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":173},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":174},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":181},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":182}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":130},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":138},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":139},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":140},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":148},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":149}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":131},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":132},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":133},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":134},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":135},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":136},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":137}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":141},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":144},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":198}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":142},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":143},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":184},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":196},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":197}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":145},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":146},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":147}],"properties":[],"events":[]}}}} \ No newline at end of file From 976584a5bc888352bff94a54abe0594a1db599e2 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 17:12:33 +0100 Subject: [PATCH 086/324] New docs --- docs/docs.json | 2 +- docs/gen/index.js | 29 ++++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index d74dd1394..656d5bb1f 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":3},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":161},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":162},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":163},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":154},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":155},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":156},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":157},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":158},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":159},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":160}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":168}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":166},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":167}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":70},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":150},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":151}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"names":["Client"]},"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":71},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":{"names":["Guild"]},"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":72},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"names":["User"]},"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":73},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":74},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":75},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":76},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"names":["Boolean"]},"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":77},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":78},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"names":["String"]},"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":79},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":{"names":["Date"]},"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":80},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":81},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":{"names":["Boolean"]},"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":{"names":["VoiceChannel"]},"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":{"names":["String"]},"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":85}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":88},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":105}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":89},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":90},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":91},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":92},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":93},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":94},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":95},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":96},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":97},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":98},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":99},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":102}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":106},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"names":["GuildChannel"]},"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":107},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"names":["String"]},"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":108},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"names":["String"]},"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":109}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":110},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":120},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":121},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":128}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":111},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":112},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":113},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":114},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":115},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":116},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":117},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":118},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":119}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":129},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":152},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":153},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":175},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":176},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":177},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":178},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":179},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":180},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":183}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":169},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":170},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":171},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":172},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":173},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":174},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":181},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":182}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":130},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":138},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":139},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":140},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":148},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":149}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":131},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":132},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":133},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":134},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":135},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":136},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":137}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":141},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":144},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":198}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":142},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":143},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":184},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":196},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":197}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":145},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":146},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":147}],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":4},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":161},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":162},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":163},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":154},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":155},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":156},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":157},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":158},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":159},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":160}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":168}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":166},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":167}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":70},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":150},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":151}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":71},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":72},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":73},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":74},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":75},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":76},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":77},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":78},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":79},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":80},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":81},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":85}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":88},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":105}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":89},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":90},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":91},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":92},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":93},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":94},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":95},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":96},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":97},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":98},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":99},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":102}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":106},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":107},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":108},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":109}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":110},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":120},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":121},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":128}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":111},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":112},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":113},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":114},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":115},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":116},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":117},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":118},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":119}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":129},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":152},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":153},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":175},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":176},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":177},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":178},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":179},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":180},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":183}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":169},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":170},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":171},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":172},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":173},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":174},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":181},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":182}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":130},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":138},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":139},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":140},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":148},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":149}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":131},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":132},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":133},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":134},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":135},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":136},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":137}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":141},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":144},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":198}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":142},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":143},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":184},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":196},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":197}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":145},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":146},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":147}],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js index 307c237c6..797fa1d89 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -4,7 +4,7 @@ let parse; const customDocs = require('../custom/index'); -const GEN_VERSION = 3; +const GEN_VERSION = 4; try { fs = require('fs-extra'); @@ -25,6 +25,23 @@ const stream = parse({ const cwd = (`${process.cwd()}\\`).replace(/\\/g, '/'); +const regex = /([\w]+)([^\w]+)/; +const regexG = /([\w]+)([^\w]+)/g; + +function matchReturnName(str) { + const matches = str.match(regexG); + const output = []; + if (matches) { + for (const match of matches) { + const groups = match.match(regex); + output.push([groups[1], groups[2]]); + } + } else { + output.push([str.match(/(\w+)/g), '']); + } + return output; +} + function cleanPaths() { for (const item of json) { if (item.meta && item.meta.path) { @@ -55,9 +72,19 @@ function clean() { }; } else if (item.kind === 'member') { const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; + const newTypes = []; + for (const name of item.type.names) { + newTypes.push(matchReturnName(name)); + } + item.type = newTypes; obj.properties.push(item); } else if (item.kind === 'function' && item.memberof) { const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; + const newReturns = []; + for (const name of item.returns[0].type.names) { + newReturns.push(matchReturnName(name)); + } + item.returns = newReturns; obj.functions.push(item); } } From 3e3a411a42744a8e2933d2c3361a5765a664a483 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 18:51:31 +0100 Subject: [PATCH 087/324] fix docs --- docs/docs.json | 2 +- src/client/Client.js | 4 ++-- src/structures/Channel.js | 2 +- src/structures/Message.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 656d5bb1f..a2839b51b 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":4},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":161},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":162},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":163},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":154},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":155},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":156},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":157},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":158},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":159},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":160}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":168}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":166},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":167}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":70},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":150},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":151}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":71},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":72},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":73},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":74},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":75},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":76},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":77},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":78},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":79},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":80},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":81},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":85}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":88},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":105}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":89},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":90},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":91},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":92},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":93},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":94},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":95},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":96},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":97},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":98},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":99},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":102}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":106},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":107},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":108},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":109}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":110},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":120},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":121},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":128}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":111},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":112},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":113},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":114},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":115},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":116},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":117},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":118},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":119}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":129},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":152},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":153},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":175},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":176},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":177},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":178},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":179},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":180},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":183}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":169},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":170},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":171},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":172},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":173},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":174},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":181},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":182}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":130},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":138},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":139},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":140},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":148},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":149}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":131},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":132},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":133},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":134},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":135},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":136},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":137}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":141},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":144},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":198}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":142},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":143},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":184},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":196},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":197}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":145},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":146},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":147}],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":4},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":161},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":162},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":163},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":154},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":155},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":156},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":157},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":158},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":159},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":160}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":168}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":166},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":167}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":70},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":150},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":151}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":71},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":72},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":73},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":74},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":75},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":76},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":77},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":78},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":79},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":80},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":81},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":85}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":88},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":105}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":89},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":90},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":91},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":92},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":93},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":94},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":95},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":96},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":97},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":98},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":99},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":102}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":106},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":107},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":108},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":109}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":110},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":120},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":121},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":128}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":111},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":112},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":113},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":114},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":115},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":116},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":117},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":118},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":119}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":129},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":152},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":153},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":175},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":176},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":177},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":178},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":179},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":180},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":183}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":169},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":170},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":171},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":172},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":173},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":174},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":181},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":182}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":130},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":138},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":139},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":140},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":148},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":149}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":131},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":132},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":133},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":134},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":135},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":136},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":137}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":141},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":144},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":198}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":142},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":143},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":184},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":196},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":197}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":145},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":146},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":147}],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index e1ea2a527..8a55f54ae 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -33,9 +33,9 @@ class Client extends EventEmitter { * much better to use a bot account rather than a user account. * Bot accounts have higher rate limits and have access to some features user accounts don't have. User bots * that are making a lot of API requests can even be banned. - * @param {string} emailOrToken The email or token used for the account. If it is an email, a password _must_ be + * @param {String} emailOrToken The email or token used for the account. If it is an email, a password _must_ be * provided. - * @param {string} [password] The password for the account, only needed if an email was provided. + * @param {String} [password] The password for the account, only needed if an email was provided. * @return {Promise} * @example * // log the client in using a token diff --git a/src/structures/Channel.js b/src/structures/Channel.js index 8dd95404b..ae8a9715b 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -5,7 +5,7 @@ class Channel { constructor(client, data, guild) { /** * The client that instantiated the Channel - * @type {Channel} + * @type {Client} */ this.client = client; this.typingMap = {}; diff --git a/src/structures/Message.js b/src/structures/Message.js index 6cfa46167..e0368a53e 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -18,7 +18,7 @@ class Message { } /** - * The client that instantiated the Object + * The client that instantiated the Message * @type {Client} */ this.client = client; From 863495cda03399b743ff562bd5c6612cdeacf104 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 18:57:20 +0100 Subject: [PATCH 088/324] add DMChannel docs --- docs/docs.json | 2 +- src/structures/DMChannel.js | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index a2839b51b..f7e44a92f 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":4},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":161},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":162},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":163},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":154},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":155},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":156},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":157},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":158},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":159},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":160}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":168}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":166},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":167}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":70},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":150},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":151}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":71},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":72},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":73},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":74},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":75},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":76},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":77},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":78},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":79},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":80},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":81},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":85}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":88},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":105}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":89},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":90},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":91},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":92},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":93},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":94},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":95},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":96},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":97},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":98},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":99},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":102}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":106},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":107},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":108},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":109}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":110},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":120},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":121},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":128}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":111},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":112},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":113},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":114},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":115},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":116},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":117},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":118},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":119}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":129},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":152},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":153},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":175},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":176},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":177},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":178},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":179},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":180},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":183}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":169},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":170},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":171},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":172},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":173},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":174},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":181},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":182}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":130},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":138},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":139},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":140},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":148},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":149}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":131},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":132},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":133},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":134},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":135},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":136},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":137}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":141},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":144},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":198}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":142},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":143},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":184},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":196},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":197}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":145},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":146},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":147}],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":4},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":167},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":168},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":169},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":170},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":171}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":160},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":161},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":162},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":163},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":164},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":165},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":166}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":14},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":17},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":156},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":157},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":174}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":15},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":16},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":172},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":173}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":18},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":54}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":60}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":61},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":70},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":71},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":72},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":73},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":177}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":175},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":176}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":74},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":90},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":91},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":154},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":155}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":75},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":76},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":77},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":78},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":79},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":80},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":81},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":85},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":88},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":89}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":92},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":107},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":108},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":109}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":93},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":94},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":95},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":96},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":97},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":98},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":99},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":102},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":105},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":106}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":110},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":111},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":112},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":113}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":114},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":128},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":129},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":130},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":131},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":132}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":115},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":116},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":117},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":118},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":119},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":120},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":121},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":123}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":133},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":158},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":159},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":184},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":192}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":178},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":179},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":180},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":181},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":182},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":183},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":190},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":191}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":134},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":142},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":143},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":144},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":152},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":153}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":135},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":136},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":137},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":138},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":139},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":140},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":141}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":145},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":148},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":199},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":204},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":207}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":146},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":147},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":196},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":197},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":198},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":205},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":206}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":149},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":150},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":151}],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 3714339bd..14247b474 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -3,6 +3,11 @@ const TextBasedChannel = require('./interface/TextBasedChannel'); const User = require('./User'); const TextChannelDataStore = require('./datastore/TextChannelDataStore'); +/** + * Represents a Direct Message Channel between two users. + * @extends {Channel} + * @implements {TextBasedChannel} + */ class DMChannel extends Channel { constructor(client, data) { super(client, data); @@ -26,13 +31,34 @@ class DMChannel extends Channel { setup(data) { super.setup(data); + /** + * The recipient on the other end of the DM + * @type {User} + */ this.recipient = this.client.store.add('users', new User(this.client, data.recipients[0])); + /** + * The ID of the last sent message, if available + * @type {?String} + */ this.lastMessageID = data.last_message_id; } + /** + * When concatenated with a String, this automatically concatenates the recipient's mention instead of the + * DM channel object. + * @returns {String} + */ toString() { return this.recipient.toString(); } + + sendMessage() { + return; + } + + sendTTSMessage() { + return; + } } TextBasedChannel.applyToClass(DMChannel); From 2dfd01d56e0a2f7565ffe084a90283b68cd3d29a Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 21:44:08 +0100 Subject: [PATCH 089/324] Add new typedef parsing (for resolvables) --- docs/docs.json | 2 +- docs/gen/index.js | 6 ++++- src/client/ClientDataResolver.js | 41 ++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index f7e44a92f..ee9501ab3 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":4},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":167},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":168},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":169},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":170},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":171}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":160},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":161},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":162},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":163},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":164},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":165},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":166}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":14},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":17},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":156},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":157},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":174}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":15},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":16},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":172},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":173}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":18},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":54}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":60}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":61},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":70},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":71},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":72},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":73},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":177}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":175},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":176}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":74},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":90},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":91},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":154},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":155}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":75},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":76},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":77},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":78},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":79},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":80},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":81},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":85},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":88},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":89}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":92},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":107},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":108},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":109}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":93},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":94},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":95},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":96},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":97},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":98},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":99},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":102},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":105},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":106}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":110},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":111},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":112},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":113}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":114},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":128},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":129},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":130},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":131},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":132}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":115},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":116},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":117},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":118},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":119},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":120},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":121},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":123}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":133},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":158},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":159},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":184},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":192}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":178},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":179},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":180},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":181},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":182},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":183},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":190},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":191}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":134},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":142},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":143},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":144},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":152},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":153}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":135},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":136},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":137},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":138},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":139},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":140},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":141}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":145},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":148},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":199},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":204},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":207}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":146},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":147},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":196},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":197},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":198},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":205},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":206}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":149},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":150},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":151}],"properties":[],"events":[]}}}} \ No newline at end of file +{"meta":{"version":5},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":3},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":5},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":7},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":9}],"properties":[],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":10},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":13}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":11},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":12}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":14},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":17},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":18},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":19},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":20},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":174},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":175},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":176},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":177},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":178}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":15},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":16},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":167},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":168},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":169},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":170},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":171},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":172},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":173}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":21},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":24},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":163},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":181}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":22},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":23},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":179},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":180}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":25},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":61}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":67}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":68},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":75},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":76},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":77},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":78},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":79},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":80},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":184}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":70},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":71},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":72},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":73},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":74},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":182},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":183}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":81},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":161},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":162}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":85},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":88},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":89},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":90},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":91},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":92},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":93},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":94},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":95},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":96}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":99},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":116}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":102},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":105},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":106},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":107},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":108},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":109},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":110},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":111},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":112},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":113}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":117},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":118},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":119},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":120}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":121},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":131},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":132},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":133},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":134},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":135},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":139}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":128},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":129},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":130}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":140},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":166},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":196},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":199}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":197},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":198}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":141},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":149},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":150},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":151},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":159},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":160}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":142},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":143},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":144},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":145},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":146},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":147},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":148}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":152},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":155},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":206},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":209},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":210},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":211},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":214}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":153},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":154},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":204},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":205},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":212},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":213}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":156},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":157},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":158}],"properties":[],"events":[]}},"typedefs":[{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":4},{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":6},{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":8}]}} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js index 797fa1d89..22e5635a1 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -4,7 +4,7 @@ let parse; const customDocs = require('../custom/index'); -const GEN_VERSION = 4; +const GEN_VERSION = 5; try { fs = require('fs-extra'); @@ -21,6 +21,7 @@ let json = ''; const stream = parse({ src: ['./src/*.js', './src/*/*.js', './src/**/*.js'], + private: true, }); const cwd = (`${process.cwd()}\\`).replace(/\\/g, '/'); @@ -54,6 +55,7 @@ function clean() { const cleaned = { classes: {}, interfaces: {}, + typedefs: [], }; for (const item of json) { if (item.kind === 'class') { @@ -86,6 +88,8 @@ function clean() { } item.returns = newReturns; obj.functions.push(item); + } else if (item.kind === 'typedef') { + cleaned.typedefs.push(item); } } json = cleaned; diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index e7003f468..18776c40b 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -10,12 +10,30 @@ function $string(obj) { return (typeof obj === 'string' || obj instanceof String); } +/** + * The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g. + * extracting a User from a Message object. + * @private + */ class ClientDataResolver { constructor(client) { this.client = client; } + /** + * Data that resolves to give a User object. This can be: + * * A User object + * * A User ID + * * A Message (resolves to the message author) + * * A Guild (owner of the guild) + * @typedef {User|String|Message|Guild} UserResolvable + */ + /** + * Resolves a UserResolvable to a User object + * @param {UserResolvable} user the UserResolvable to identify + * @returns {User} + */ resolveUser(user) { if (user instanceof User) { return user; @@ -30,6 +48,17 @@ class ClientDataResolver { return null; } + /** + * Data that resolves to give a Guild object. This can be: + * * A Guild object + * @typedef {Guild} GuildResolvable + */ + + /** + * Resolves a GuildResolvable to a Guild object + * @param {GuildResolvable} guild the GuildResolvable to identify + * @returns {Guild} + */ resolveGuild(guild) { if (guild instanceof Guild) { return guild; @@ -37,6 +66,18 @@ class ClientDataResolver { return null; } + /** + * Data that resolves to give a GuildMember object. This can be: + * * A GuildMember object + * * A User object + * @typedef {Guild} GuildResolvable + */ + /** + * Resolves a GuildMemberResolvable to a GuildMember object + * @param {GuildResolvable} guild the guild that the member is part of + * @param {UserResolvable} user the user that is part of the guild + * @returns {GuildMember} + */ resolveGuildMember($guild, $user) { let guild = $guild; let user = $user; From cc563f77c54bf6bdd0535c8752108bfd6276a7e0 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 22:02:22 +0100 Subject: [PATCH 090/324] =?UTF-8?q?rename=20some=20stuff=20=C2=AF\=5F(?= =?UTF-8?q?=E3=83=84)=5F/=C2=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs.json | 2 +- src/client/ClientDataResolver.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index ee9501ab3..f9b809df6 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":5},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":3},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":5},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":7},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":9}],"properties":[],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":10},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":13}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":11},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":12}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":14},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":17},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":18},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":19},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":20},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":174},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":175},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":176},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":177},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":178}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":15},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":16},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":167},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":168},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":169},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":170},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":171},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":172},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":173}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":21},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":24},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":163},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":181}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":22},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":23},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":179},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":180}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":25},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":61}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":67}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":68},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":75},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":76},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":77},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":78},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":79},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":80},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":184}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":70},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":71},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":72},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":73},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":74},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":182},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":183}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":81},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":161},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":162}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":85},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":88},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":89},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":90},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":91},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":92},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":93},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":94},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":95},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":96}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":99},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":116}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":102},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":105},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":106},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":107},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":108},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":109},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":110},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":111},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":112},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":113}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":117},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":118},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":119},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":120}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":121},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":131},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":132},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":133},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":134},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":135},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":139}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":128},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":129},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":130}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":140},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":166},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":196},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":199}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":197},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":198}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":141},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":149},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":150},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":151},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":159},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":160}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":142},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":143},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":144},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":145},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":146},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":147},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":148}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":152},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":155},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":206},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":209},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":210},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":211},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":214}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":153},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":154},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":204},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":205},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":212},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":213}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":156},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":157},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":158}],"properties":[],"events":[]}},"typedefs":[{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":4},{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":6},{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":8}]}} \ No newline at end of file +{"meta":{"version":5},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":3},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":5},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":7},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":9}],"properties":[],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":10},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":13}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":11},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":12}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":14},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":17},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":18},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":19},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":20},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":174},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":175},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":176},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":177},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":178}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":15},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":16},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":167},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":168},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":169},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":170},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":171},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":172},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":173}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":21},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":24},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":163},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":181}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":22},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":23},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":179},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":180}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":25},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":61}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":67}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":68},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":75},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":76},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":77},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":78},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":79},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":80},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":184}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":70},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":71},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":72},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":73},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":74},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":182},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":183}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":81},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":161},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":162}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":85},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":88},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":89},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":90},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":91},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":92},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":93},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":94},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":95},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":96}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":99},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":116}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":102},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":105},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":106},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":107},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":108},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":109},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":110},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":111},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":112},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":113}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":117},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":118},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":119},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":120}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":121},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":131},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":132},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":133},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":134},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":135},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":139}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":128},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":129},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":130}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":140},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":166},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":196},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":199}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":197},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":198}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":141},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":149},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":150},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":151},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":159},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":160}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":142},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":143},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":144},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":145},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":146},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":147},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":148}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":152},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":155},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":206},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":209},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":210},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":211},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":214}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":153},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":154},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":204},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":205},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":212},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":213}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":156},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":157},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":158}],"properties":[],"events":[]}},"typedefs":[{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":4},{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":6},{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":8}]}} \ No newline at end of file diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index 18776c40b..f17a1cb94 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -70,7 +70,7 @@ class ClientDataResolver { * Data that resolves to give a GuildMember object. This can be: * * A GuildMember object * * A User object - * @typedef {Guild} GuildResolvable + * @typedef {Guild} GuildMemberResolvable */ /** * Resolves a GuildMemberResolvable to a GuildMember object From 3c5a227ea00cd0ed94c49e5ebbebf4c0c29a0284 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 23:01:46 +0100 Subject: [PATCH 091/324] Restructure typedef placement --- docs/docs.json | 2 +- docs/gen/index.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index f9b809df6..053275d55 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":5},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":3},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":5},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":7},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":9}],"properties":[],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":10},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":13}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":11},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":12}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":14},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":17},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":18},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":19},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":20},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":174},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":175},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":176},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":177},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":178}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":15},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":16},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":167},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":168},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":169},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":170},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":171},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":172},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":173}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":21},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":24},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":163},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":181}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":22},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":23},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":179},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":180}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":25},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":61}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":67}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":68},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":75},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":76},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":77},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":78},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":79},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":80},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":184}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":70},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":71},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":72},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":73},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":74},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":182},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":183}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":81},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":161},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":162}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":85},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":88},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":89},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":90},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":91},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":92},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":93},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":94},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":95},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":96}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":99},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":116}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":102},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":105},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":106},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":107},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":108},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":109},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":110},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":111},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":112},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":113}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":117},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":118},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":119},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":120}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":121},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":131},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":132},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":133},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":134},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":135},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":139}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":128},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":129},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":130}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":140},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":166},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":196},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":199}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":197},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":198}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":141},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":149},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":150},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":151},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":159},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":160}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":142},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":143},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":144},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":145},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":146},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":147},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":148}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":152},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":155},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":206},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":209},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":210},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":211},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":214}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":153},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":154},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":204},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":205},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":212},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":213}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":156},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":157},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":158}],"properties":[],"events":[]}},"typedefs":[{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":4},{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":6},{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":8}]}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":3},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":5},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":7},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":9}],"properties":[],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":10},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":13}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":11},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":12}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":14},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":17},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":18},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":19},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":20},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":174},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":175},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":176},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":177},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":178}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":15},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":16},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":167},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":168},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":169},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":170},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":171},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":172},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":173}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":21},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":24},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":163},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":181}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":22},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":23},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":179},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":180}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":25},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":61}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":67}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":68},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":75},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":76},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":77},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":78},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":79},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":80},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":184}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":70},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":71},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":72},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":73},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":74},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":182},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":183}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":81},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":161},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":162}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":85},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":88},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":89},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":90},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":91},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":92},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":93},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":94},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":95},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":96}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":99},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":116}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":102},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":105},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":106},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":107},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":108},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":109},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":110},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":111},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":112},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":113}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":117},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":118},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":119},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":120}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":121},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":131},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":132},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":133},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":134},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":135},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":139}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":128},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":129},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":130}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":140},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":166},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":196},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":199}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":197},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":198}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":141},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":149},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":150},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":151},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":159},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":160}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":142},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":143},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":144},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":145},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":146},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":147},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":148}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":152},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":155},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":206},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":209},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":210},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":211},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":214}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":153},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":154},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":204},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":205},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":212},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":213}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":156},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":157},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":158}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":4},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":6},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":8}}}} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js index 22e5635a1..a4f1a0160 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -4,7 +4,7 @@ let parse; const customDocs = require('../custom/index'); -const GEN_VERSION = 5; +const GEN_VERSION = 6; try { fs = require('fs-extra'); @@ -55,7 +55,7 @@ function clean() { const cleaned = { classes: {}, interfaces: {}, - typedefs: [], + typedefs: {}, }; for (const item of json) { if (item.kind === 'class') { @@ -89,7 +89,7 @@ function clean() { item.returns = newReturns; obj.functions.push(item); } else if (item.kind === 'typedef') { - cleaned.typedefs.push(item); + cleaned.typedefs[item.longname] = item; } } json = cleaned; From a52b46fab4a539c803e1c174e79b7da32fdc9eb7 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 23:51:05 +0100 Subject: [PATCH 092/324] Document private props in Client --- docs/docs.json | 2 +- src/client/Client.js | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 053275d55..c2866ef5e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":3},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":5},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":7},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":9}],"properties":[],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":10},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":13}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":11},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":12}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":14},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":17},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":18},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":19},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":20},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":174},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":175},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":176},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":177},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":178}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":15},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":16},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":167},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":168},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":169},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":170},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":171},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":172},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":173}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":21},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":24},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":163},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":181}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":22},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":23},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":179},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":180}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":25},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":61}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":67}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":68},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":75},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":76},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":77},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":78},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":79},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":80},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":184}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":70},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":71},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":72},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":73},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":74},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":182},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":183}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":81},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":161},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":162}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":82},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":83},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":84},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":85},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":86},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":87},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":88},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":89},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":90},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":91},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":92},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":93},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":94},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":95},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":96}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":99},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":116}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":100},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":101},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":102},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":103},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":104},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":105},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":106},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":107},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":108},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":109},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":110},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":111},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":112},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":113}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":117},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":118},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":119},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":120}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":121},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":131},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":132},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":133},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":134},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":135},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":139}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":122},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":123},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":124},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":125},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":126},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":127},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":128},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":129},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":130}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":140},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":166},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":196},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":199}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":185},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":186},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":187},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":188},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":189},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":190},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":197},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":198}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":141},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":149},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":150},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":151},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":159},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":160}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":142},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":143},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":144},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":145},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":146},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":147},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":148}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":152},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":155},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":206},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":209},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":210},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":211},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":214}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":153},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":154},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":204},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":205},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":212},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":213}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":156},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":157},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":158}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":4},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":6},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":8}}}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15}],"properties":[],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":16},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":19}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":17},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":18}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":20},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":23},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":24},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":25},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":26},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":180},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":181},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":182},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":183},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":184}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":21},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":22},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":173},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":174},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":175},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":176},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":177},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":178},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":179}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":27},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":30},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":169},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":170},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":187}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":28},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":29},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":185},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":186}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":31},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":67}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":73}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":74},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":81},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":82},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":190}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":75},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":76},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":77},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":78},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":79},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":80},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":188},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":189}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":87},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":167},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":168}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":88},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":89},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":90},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":91},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":92},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":93},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":94},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":95},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":102}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":105},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":122}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":106},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":107},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":108},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":109},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":110},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":111},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":112},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":113},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":119}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":123},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":124},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":125},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":126}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":127},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":145}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":128},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":129},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":130},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":131},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":132},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":133},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":134},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":135},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":136}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":146},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":171},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":172},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":197},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":198},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":199},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":205}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":196},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":203},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":204}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":147},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":155},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":166}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":148},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":149},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":150},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":151},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":152},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":153},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":154}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":158},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":161},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":212},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":213},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":214},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":215},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":216},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":217},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":220}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":159},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":160},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":206},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":209},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":210},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":211},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":218},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":219}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":162},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":163},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14}}}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 8a55f54ae..be82d50f4 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -20,11 +20,41 @@ class Client extends EventEmitter { constructor(options) { super(); this.options = mergeDefault(Constants.DefaultOptions, options); + /** + * The REST manager of the client + * @type {RESTManager} + * @private + */ this.rest = new RESTManager(this); + /** + * The data store of the Client + * @type {ClientDataStore} + * @private + */ this.store = new ClientDataStore(this); + /** + * The manager of the Client + * @type {ClientManager} + * @private + */ this.manager = new ClientManager(this); + /** + * The WebSocket Manager of the Client + * @type {WebSocketManager} + * @private + */ this.ws = new WebSocketManager(this); + /** + * The Data Resolver of the Client + * @type {ClientDataResolver} + * @private + */ this.resolver = new ClientDataResolver(this); + /** + * The Action Manager of the Client + * @type {ActionsManager} + * @private + */ this.actions = new ActionsManager(this); } From 24df1bc6211966a53ec1b98f3a62c103b300d138 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 00:17:09 +0100 Subject: [PATCH 093/324] test private methods --- docs/docs.json | 2 +- src/structures/Guild.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index c2866ef5e..591782910 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15}],"properties":[],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":16},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":19}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":17},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":18}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":20},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":23},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":24},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":25},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":26},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":180},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":181},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":182},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":183},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":184}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":21},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":22},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":173},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":174},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":175},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":176},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":177},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":178},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":179}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":27},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":30},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":169},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":170},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":187}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":28},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":29},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":185},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":186}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":31},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":67}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":73}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":74},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":81},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":82},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":190}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":75},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":76},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":77},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":78},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":79},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":80},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":188},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":189}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":87},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":167},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":168}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":88},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":89},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":90},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":91},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":92},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":93},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":94},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":95},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":102}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":105},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":122}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":106},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":107},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":108},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":109},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":110},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":111},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":112},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":113},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":119}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":123},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":124},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":125},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":126}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":127},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":145}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":128},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":129},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":130},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":131},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":132},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":133},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":134},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":135},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":136}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":146},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":171},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":172},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":197},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":198},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":199},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":205}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":191},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":196},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":203},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":204}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":147},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":155},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":166}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":148},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":149},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":150},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":151},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":152},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":153},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":154}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":158},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":161},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":212},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":213},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":214},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":215},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":216},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":217},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":220}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":159},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":160},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":206},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":209},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":210},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":211},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":218},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":219}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":162},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":163},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14}}}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15}],"properties":[],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":16},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":19}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":17},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":18}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":20},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":23},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":24},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":25},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":26},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":181},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":182},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":183},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":184},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":185}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":21},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":22},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":174},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":175},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":176},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":177},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":178},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":179},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":180}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":27},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":30},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":170},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":171},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":188}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":28},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":29},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":186},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":187}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":31},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":168,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":307,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":363,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":377,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":391,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":405,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":419,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":433,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":447,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":461,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":475,"filename":"Guild.js","path":"src/structures"},"order":68}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":175,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":185,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":190,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":249,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":262,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":484,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":492,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":499,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":507,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":514,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":522,"filename":"Guild.js","path":"src/structures"},"order":74}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":75},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":82},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":191}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":76},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":77},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":78},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":79},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":80},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":81},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":189},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":190}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":88},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":168},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":169}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":89},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":90},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":91},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":92},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":93},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":94},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":95},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":103}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":106},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":123}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":107},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":108},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":109},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":110},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":111},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":112},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":113},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":120}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":124},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":125},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":126},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":127}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":128},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":146}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":129},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":130},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":131},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":132},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":133},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":134},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":135},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":137}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":147},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":172},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":173},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":198},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":199},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":206}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":196},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":197},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":204},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":205}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":148},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":166},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":167}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":149},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":150},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":151},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":152},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":153},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":154},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":155}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":159},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":162},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":213},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":214},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":215},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":216},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":217},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":218},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":221}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":160},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":161},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":209},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":210},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":211},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":212},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":219},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":220}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":163},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14}}}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 9262b9e42..0b301f707 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -159,6 +159,12 @@ class Guild { return base; } + /** + * Sets up the Guild + * @param {any} data + * @returns {null} + * @private + */ setup(data) { this.id = data.id; this.available = !data.unavailable; From e0c987c1b20eaf2ddd24934ce32934540a9b7fff Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 00:33:12 +0100 Subject: [PATCH 094/324] add docs for ClientManager --- docs/docs.json | 2 +- src/client/ClientManager.js | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 591782910..7647a0cec 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15}],"properties":[],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":16},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":19}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":17},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":18}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":20},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":23},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":24},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":25},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":26},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":181},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":182},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":183},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":184},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":185}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":21},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":22},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":174},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":175},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":176},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":177},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":178},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":179},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":180}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":27},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":30},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":170},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":171},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":188}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":28},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":29},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":186},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":187}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":31},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":168,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":307,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":363,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":377,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":391,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":405,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":419,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":433,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":447,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":461,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":475,"filename":"Guild.js","path":"src/structures"},"order":68}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":175,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":185,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":190,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":249,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":262,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":484,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":492,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":499,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":507,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":514,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":522,"filename":"Guild.js","path":"src/structures"},"order":74}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":75},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":82},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":191}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":76},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":77},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":78},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":79},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":80},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":81},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":189},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":190}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":88},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":168},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":169}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":89},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":90},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":91},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":92},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":93},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":94},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":95},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":103}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":106},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":123}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":107},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":108},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":109},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":110},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":111},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":112},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":113},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":120}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":124},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":125},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":126},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":127}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":128},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":146}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":129},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":130},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":131},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":132},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":133},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":134},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":135},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":137}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":147},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":172},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":173},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":198},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":199},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":206}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":192},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":193},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":194},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":195},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":196},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":197},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":204},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":205}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":148},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":166},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":167}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":149},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":150},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":151},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":152},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":153},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":154},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":155}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":159},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":162},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":213},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":214},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":215},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":216},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":217},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":218},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":221}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":160},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":161},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":209},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":210},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":211},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":212},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":219},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":220}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":163},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":164},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":165}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14}}}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","access":"private","meta":{"lineno":3,"filename":"ClientManager.js","path":"src/client"},"order":16},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":30,"filename":"ClientManager.js","path":"src/client"},"order":20},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":47,"filename":"ClientManager.js","path":"src/client"},"order":21}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":15,"filename":"ClientManager.js","path":"src/client"},"order":18},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":20,"filename":"ClientManager.js","path":"src/client"},"order":19}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":22},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":25}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":23},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":24}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":26},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":29},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":30},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":31},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":187},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":188},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":189},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":190},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":191}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":27},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":28},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":180},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":181},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":182},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":183},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":184},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":185},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":186}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":33},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":36},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":176},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":177},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":194}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":34},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":35},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":192},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":193}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":37},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":168,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":307,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":363,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":377,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":391,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":405,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":419,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":433,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":447,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":461,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":475,"filename":"Guild.js","path":"src/structures"},"order":74}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":175,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":185,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":190,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":249,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":262,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":484,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":492,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":499,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":507,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":514,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":522,"filename":"Guild.js","path":"src/structures"},"order":80}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":81},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":197}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":82},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":195},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":196}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":94},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":174},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":175}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":95},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":109}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":112},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":129}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":113},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":126}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":130},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":133}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":134},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":152}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":135},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":143}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":153},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":178},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":179},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":204},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":205},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":206},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":209},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":212}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":198},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":199},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":210},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":211}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":154},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":162},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":172},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":173}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":155},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":161}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":165},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":219},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":220},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":221},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":222},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":223},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":224},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":227}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":213},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":214},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":215},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":216},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":217},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":218},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":225},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":226}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":169},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":170},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":171}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14}}}} \ No newline at end of file diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index 175e905ad..e8c34caaf 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -1,12 +1,32 @@ const Constants = require('../util/Constants'); +/** + * Manages the State and Background Tasks of the Client + * @class ClientManager + * @private + */ class ClientManager { constructor(client) { + /** + * The Client that instantiated this Manager + * @type {Client} + */ this.client = client; + /** + * The heartbeat interval, null if not yet set + * @type {?Number} + */ this.heartbeatInterval = null; } + /** + * Connects the Client to the WebSocket + * @param {String} token the authorization token + * @param {Function} resolve function to run when connection is successful + * @param {Function} reject function to run when connection fails + * @returns {null} + */ connectToWebSocket(token, resolve, reject) { this.client.store.token = token; this.client.rest.methods.getGateway() @@ -19,6 +39,11 @@ class ClientManager { setTimeout(() => reject(Constants.Errors.TOOK_TOO_LONG), 1000 * 15); } + /** + * Sets up a keep-alive interval to keep the Client's connection valid + * @param {Number} time the interval in milliseconds at which heartbeat packets should be sent + * @returns {null} + */ setupKeepAlive(time) { this.heartbeatInterval = setInterval(() => { this.client.ws.send({ From 871c60c8ddccb68880e2ddb484a23eaba0397f3c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 00:33:49 +0100 Subject: [PATCH 095/324] fix client manager docs oops --- docs/docs.json | 2 +- src/client/ClientManager.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 7647a0cec..d51c44464 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","access":"private","meta":{"lineno":3,"filename":"ClientManager.js","path":"src/client"},"order":16},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":30,"filename":"ClientManager.js","path":"src/client"},"order":20},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":47,"filename":"ClientManager.js","path":"src/client"},"order":21}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":15,"filename":"ClientManager.js","path":"src/client"},"order":18},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":20,"filename":"ClientManager.js","path":"src/client"},"order":19}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":22},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":25}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":23},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":24}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":26},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":29},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":30},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":31},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":187},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":188},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":189},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":190},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":191}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":27},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":28},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":180},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":181},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":182},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":183},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":184},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":185},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":186}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":33},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":36},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":176},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":177},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":194}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":34},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":35},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":192},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":193}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":37},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":168,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":307,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":363,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":377,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":391,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":405,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":419,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":433,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":447,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":461,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":475,"filename":"Guild.js","path":"src/structures"},"order":74}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":175,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":185,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":190,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":249,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":262,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":484,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":492,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":499,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":507,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":514,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":522,"filename":"Guild.js","path":"src/structures"},"order":80}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":81},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":197}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":82},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":195},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":196}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":94},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":174},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":175}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":95},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":109}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":112},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":129}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":113},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":126}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":130},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":133}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":134},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":152}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":135},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":143}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":153},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":178},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":179},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":204},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":205},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":206},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":209},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":212}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":198},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":199},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":210},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":211}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":154},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":162},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":172},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":173}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":155},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":161}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":165},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":219},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":220},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":221},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":222},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":223},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":224},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":227}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":213},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":214},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":215},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":216},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":217},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":218},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":225},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":226}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":169},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":170},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":171}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14}}}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":16},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":19},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":20}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":17},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":18}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":21},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":24}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":22},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":23}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":25},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":28},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":29},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":30},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":31},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":186},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":187},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":188},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":189},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":190}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":26},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":27},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":179},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":180},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":181},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":182},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":183},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":184},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":185}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":32},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":35},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":175},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":176},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":193}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":33},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":34},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":191},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":192}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":36},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":168,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":307,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":363,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":377,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":391,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":405,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":419,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":433,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":447,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":461,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":475,"filename":"Guild.js","path":"src/structures"},"order":73}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":175,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":185,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":190,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":249,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":262,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":484,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":492,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":499,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":507,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":514,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":522,"filename":"Guild.js","path":"src/structures"},"order":79}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":80},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":196}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":81},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":82},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":194},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":195}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":93},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":173},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":174}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":94},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":95},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":108}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":111},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":128}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":112},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":113},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":125}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":129},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":130},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":133},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":151}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":134},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":135},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":142}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":152},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":177},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":178},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":204},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":205},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":206},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":211}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":197},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":198},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":199},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":209},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":210}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":153},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":162},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":171},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":172}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":154},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":155},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":160}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":164},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":218},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":219},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":220},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":221},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":222},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":223},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":226}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":165},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":212},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":213},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":214},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":215},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":216},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":217},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":224},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":225}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":168},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":169},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":170}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14}}}} \ No newline at end of file diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index e8c34caaf..6fa7dc4d0 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -2,7 +2,6 @@ const Constants = require('../util/Constants'); /** * Manages the State and Background Tasks of the Client - * @class ClientManager * @private */ class ClientManager { From dbe978d926e5adec9aa39f5392f4bdfae4fa0d54 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 13:59:14 +0100 Subject: [PATCH 096/324] Finish DataResolver docs --- docs/docs.json | 2 +- src/client/ClientDataResolver.js | 43 +++++++++++++++++++++++++++++--- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index d51c44464..699503093 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":16},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":19},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":20}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":17},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":18}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":21},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":24}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":22},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":23}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":25},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":28},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":29},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":30},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":31},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":186},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":187},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":188},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":189},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":190}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":26},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":27},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":179},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":180},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":181},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":182},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":183},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":184},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":185}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":32},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":35},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":175},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":176},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":193}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":33},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":34},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":191},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":192}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":36},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":168,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":307,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":363,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":377,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":391,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":405,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":419,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":433,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":447,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":461,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":475,"filename":"Guild.js","path":"src/structures"},"order":73}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":175,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":185,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":190,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":249,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":262,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":484,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":492,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":499,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":507,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":514,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":522,"filename":"Guild.js","path":"src/structures"},"order":79}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":80},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":196}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":81},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":82},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":194},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":195}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":93},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":173},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":174}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":94},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":95},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":108}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":111},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":128}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":112},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":113},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":125}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":129},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":130},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":133},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":151}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":134},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":135},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":142}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":152},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":177},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":178},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":204},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":205},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":206},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":211}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":197},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":198},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":199},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":200},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":201},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":202},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":209},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":210}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":153},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":162},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":171},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":172}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":154},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":155},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":160}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":164},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":218},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":219},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":220},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":221},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":222},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":223},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":226}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":165},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":212},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":213},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":214},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":215},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":216},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":217},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":224},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":225}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":168},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":169},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":170}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14}}}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":192},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":193},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":194},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":195},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":196}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":185},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":186},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":187},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":188},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":189},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":190},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":191}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":181},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":182},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":199}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":197},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":198}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":168,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":307,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":363,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":377,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":391,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":405,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":419,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":433,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":447,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":461,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":475,"filename":"Guild.js","path":"src/structures"},"order":79}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":175,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":185,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":190,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":249,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":262,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":484,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":492,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":499,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":507,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":514,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":522,"filename":"Guild.js","path":"src/structures"},"order":85}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":86},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":202}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":200},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":201}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":99},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":179},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":180}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":114}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":117},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":134}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":131}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":135},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":136},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":137},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":138}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":139},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":153},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":157}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":148}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":158},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":183},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":184},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":209},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":210},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":211},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":212},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":213},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":214},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":217}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":204},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":205},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":206},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":215},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":216}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":159},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":169},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":177},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":178}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":162},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":166}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":170},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":173},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":224},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":225},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":226},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":227},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":228},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":229},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":232}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":171},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":172},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":218},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":219},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":220},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":221},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":222},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":223},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":230},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":231}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":174},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":175},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":176}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index f17a1cb94..188b44eeb 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -32,7 +32,7 @@ class ClientDataResolver { /** * Resolves a UserResolvable to a User object * @param {UserResolvable} user the UserResolvable to identify - * @returns {User} + * @returns {?User} */ resolveUser(user) { if (user instanceof User) { @@ -57,7 +57,7 @@ class ClientDataResolver { /** * Resolves a GuildResolvable to a Guild object * @param {GuildResolvable} guild the GuildResolvable to identify - * @returns {Guild} + * @returns {?Guild} */ resolveGuild(guild) { if (guild instanceof Guild) { @@ -76,7 +76,7 @@ class ClientDataResolver { * Resolves a GuildMemberResolvable to a GuildMember object * @param {GuildResolvable} guild the guild that the member is part of * @param {UserResolvable} user the user that is part of the guild - * @returns {GuildMember} + * @returns {?GuildMember} */ resolveGuildMember($guild, $user) { let guild = $guild; @@ -95,6 +95,18 @@ class ClientDataResolver { return guild.store.get('members', user.id); } + /** + * 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} dataResolvable the base 64 resolvable you want to resolve + * @returns {?String} + */ resolveBase64(data) { if (data instanceof Buffer) { return `data:image/jpg;base64,${data.toString('base64')}`; @@ -103,6 +115,18 @@ class ClientDataResolver { return data; } + /** + * Data that can be resolved to give a Channel. This can be: + * * An instance of a Channel + * * An ID of a Channel + * @typedef {Channel|String} ChannelResolvable + */ + + /** + * Resolves a ChannelResolvable to a Channel object + * @param {ChannelResolvable} channelResolvable the channel resolvable to resolve + * @returns {?Channel} + */ resolveChannel(channel) { if (channel instanceof Channel) { return channel; @@ -115,6 +139,19 @@ class ClientDataResolver { return null; } + /** + * Data that can be resolved to give a String. This can be: + * * A String + * * An Array (joined with a new line delimiter to give a string) + * * Any object + * @typedef {String|Array|Object} StringResolvable + */ + + /** + * Resolves a StringResolvable to a String + * @param {StringResolvable} stringResolvable the string resolvable to resolve + * @returns {String} + */ resolveString(data) { if (data instanceof String) { return data; From 392133f9275275d53aa9fae8463f837acede081b Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 14:14:26 +0100 Subject: [PATCH 097/324] document websocketmanager --- docs/docs.json | 2 +- src/client/websocket/WebSocketManager.js | 73 ++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 699503093..5868cdc4b 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":192},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":193},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":194},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":195},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":196}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":185},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":186},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":187},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":188},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":189},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":190},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":191}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":181},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":182},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":199}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":197},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":198}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":168,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":307,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":363,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":377,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":391,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":405,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":419,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":433,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":447,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":461,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":475,"filename":"Guild.js","path":"src/structures"},"order":79}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":175,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":185,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":190,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":249,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":262,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":484,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":492,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":499,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":507,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":514,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":522,"filename":"Guild.js","path":"src/structures"},"order":85}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":86},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":202}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":200},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":201}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":99},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":179},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":180}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":114}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":117},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":134}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":131}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":135},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":136},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":137},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":138}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":139},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":153},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":157}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":148}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":158},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":183},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":184},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":209},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":210},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":211},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":212},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":213},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":214},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":217}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":203},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":204},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":205},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":206},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":207},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":208},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":215},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":216}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":159},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":169},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":177},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":178}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":162},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":166}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":170},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":173},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":224},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":225},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":226},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":227},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":228},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":229},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":232}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":171},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":172},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":218},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":219},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":220},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":221},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":222},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":223},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":230},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":231}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":174},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":175},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":176}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":209},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":210},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":211},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":212},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":213}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":202},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":203},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":204},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":205},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":206},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":207},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":208}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":198},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":199},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":216}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":214},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":215}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":168,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":307,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":363,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":377,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":391,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":405,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":419,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":433,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":447,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":461,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":475,"filename":"Guild.js","path":"src/structures"},"order":79}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":175,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":185,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":190,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":249,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":262,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":484,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":492,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":499,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":507,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":514,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":522,"filename":"Guild.js","path":"src/structures"},"order":85}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":86},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":219}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":217},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":218}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":99},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":196},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":197}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":114}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":117},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":134}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":131}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":135},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":136},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":137},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":138}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":139},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":153},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":157}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":148}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":158},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":200},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":201},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":226},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":227},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":228},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":229},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":234}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":220},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":221},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":222},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":223},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":224},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":225},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":232},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":233}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":159},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":169},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":194},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":195}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":162},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":166}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":170},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":173},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":241},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":243},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":249}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":171},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":172},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":247},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":248}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":11,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":174},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":42,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":179},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":182},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":74,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":183},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":103,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":118,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":154,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":163,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":182,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":18,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":175},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":24,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":176},{"id":"WebSocketManager#store","longname":"WebSocketManager#store","name":"store","scope":"instance","kind":"member","description":"The WebSocketManager datastore","memberof":"WebSocketManager","type":[[[["WebSocketManagerDataStore"],""]]],"meta":{"lineno":29,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":177},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":178},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":47,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":180},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":52,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":181}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":191},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":192},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":193}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 08df59b46..7ef9e523e 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -4,18 +4,51 @@ const zlib = require('zlib'); const PacketManager = require('./packets/WebSocketPacketManager'); const WebSocketManagerDataStore = require('../../structures/datastore/WebSocketManagerDataStore'); +/** + * The WebSocket Manager of the Client + * @private + */ class WebSocketManager { constructor(client) { + /** + * The Client that instantiated this WebSocketManager + * @type {Client} + */ this.client = client; this.ws = null; + /** + * A WebSocket Packet manager, it handles all the messages + * @type {PacketManager} + */ this.packetManager = new PacketManager(this); + /** + * The WebSocketManager datastore + * @type {WebSocketManagerDataStore} + */ this.store = new WebSocketManagerDataStore(); + /** + * The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE. + * @type {Number} + */ this.status = Constants.Status.IDLE; } + /** + * Connects the client to a given gateway + * @param {String} gateway the gateway to connect to + * @returns {null} + */ connect(gateway) { + /** + * The status of the Client's connection, a type of Constants.Status + * @type {Number} + */ this.status = Constants.Status.CONNECTING; + /** + * The WebSocket connection to the gateway + * @type {?WebSocket} + */ this.ws = new WebSocket(gateway); this.ws.onopen = () => this.eventOpen(); this.ws.onclose = () => this.eventClose(); @@ -23,12 +56,21 @@ class WebSocketManager { this.ws.onerror = (e) => this.eventError(e); } + /** + * Sends a packet to the gateway + * @param {Object} packet An object that can be JSON stringified + * @returns {null} + */ send(data) { if (this.ws.readyState === WebSocket.OPEN) { this.ws.send(JSON.stringify(data)); } } + /** + * Run whenever the gateway connections opens up + * @returns {null} + */ eventOpen() { if (this.reconnecting) { this._sendResume(); @@ -37,6 +79,10 @@ class WebSocketManager { } } + /** + * Sends a gatway resume packet, in cases of unexpected disconnections. + * @returns {null} + */ _sendResume() { const payload = { token: this.client.store.token, @@ -50,6 +96,10 @@ class WebSocketManager { }); } + /** + * Sends a new identification packet, in cases of new connections or failed reconnections. + * @returns {null} + */ _sendNewIdentify() { this.reconnecting = false; const payload = this.client.options.ws; @@ -61,12 +111,22 @@ class WebSocketManager { }); } + /** + * Run whenever the connection to the gateway is closed, it will try to reconnect the client. + * @returns {null} + */ eventClose() { if (!this.reconnecting) { this.tryReconnect(); } } + /** + * Run whenever a message is received from the WebSocket. Returns `true` if the message + * was handled properly. + * @param {Object} data the received websocket data + * @returns {Boolean} + */ eventMessage($event) { let packet; const event = $event; @@ -87,10 +147,19 @@ class WebSocketManager { return this.packetManager.handle(packet); } + /** + * Run whenever an error occurs with the WebSocket connection. Tries to reconnect + * @returns {null} + */ eventError() { this.tryReconnect(); } + /** + * Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares + * the `READY` event. + * @returns {null} + */ checkIfReady() { if (this.status !== Constants.Status.READY) { let unavailableCount = 0; @@ -106,6 +175,10 @@ class WebSocketManager { } } + /** + * Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING. + * @returns {null} + */ tryReconnect() { this.status = Constants.Status.RECONNECTING; this.ws.close(); From dcba580d89acce9ba25de3293523a0916e668f12 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 18:01:24 +0100 Subject: [PATCH 098/324] Implement Sequential Rate Limiting --- package.json | 8 +-- src/client/rest/APIRequest.js | 2 +- src/client/rest/Bucket.js | 62 ---------------- src/client/rest/RESTManager.js | 22 +++--- src/client/rest/RequestHandlers/Batch.js | 0 .../rest/RequestHandlers/RequestHandler.js | 34 +++++++++ src/client/rest/RequestHandlers/Sequential.js | 71 +++++++++++++++++++ src/client/websocket/WebSocketManager.js | 3 +- test/random.js | 4 +- 9 files changed, 122 insertions(+), 84 deletions(-) delete mode 100644 src/client/rest/Bucket.js create mode 100644 src/client/rest/RequestHandlers/Batch.js create mode 100644 src/client/rest/RequestHandlers/RequestHandler.js create mode 100644 src/client/rest/RequestHandlers/Sequential.js diff --git a/package.json b/package.json index 0cb8e060c..1eea6d378 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "object.values": "^1.0.3", "superagent": "^1.5.0", "unpipe": "^1.0.0", - "ws": "^0.8.1" + "ws": "^1.1.1" }, "devDependencies": { "babel-preset-es2015": "^6.6.0", @@ -40,15 +40,15 @@ "eslint-plugin-import": "^1.13.0", "eslint-plugin-jsx-a11y": "^2.1.0", "eslint-plugin-react": "^6.0.0", + "fs-extra": "^0.30.0", "grunt": "^0.4.5", "grunt-babel": "^6.0.0", "grunt-browserify": "^4.0.1", "grunt-contrib-uglify": "^0.11.0", "grunt-jscs": "^2.8.0", "jscs": "^2.11.0", - "load-grunt-tasks": "^3.3.0", - "fs-extra": "^0.30.0", - "jsdoc-parse": "^1.2.7" + "jsdoc-parse": "^1.2.7", + "load-grunt-tasks": "^3.3.0" }, "optionalDependencies": { "node-opus": "^0.1.11" diff --git a/src/client/rest/APIRequest.js b/src/client/rest/APIRequest.js index 462e78fdc..7fa49f604 100644 --- a/src/client/rest/APIRequest.js +++ b/src/client/rest/APIRequest.js @@ -11,7 +11,7 @@ class APIRequest { this.file = file; } - getBucketName() { + getEndpoint() { return `${this.method} ${this.url}`; } diff --git a/src/client/rest/Bucket.js b/src/client/rest/Bucket.js deleted file mode 100644 index b93ca9607..000000000 --- a/src/client/rest/Bucket.js +++ /dev/null @@ -1,62 +0,0 @@ -class Bucket { - constructor(rest, limit, remainingRequests = 1, resetTime) { - this.rest = rest; - this.limit = limit; - this.remainingRequests = remainingRequests; - this.resetTime = resetTime; - this.locked = false; - this.queue = []; - this.nextCheck = null; - } - - setCheck(time) { - clearTimeout(this.nextCheck); - console.log('going to iterate in', time, 'remaining:', this.queue.length); - this.nextCheck = setTimeout(() => { - this.remainingRequests = this.limit - 1; - this.locked = false; - this.process(); - }, time); - } - - process() { - if (this.locked) { - return; - } - - this.locked = true; - - if (this.queue.length === 0) { - return; - } - - if (this.remainingRequests === 0) { - return; - } - console.log('bucket is going to iterate', Math.min(this.remainingRequests, this.queue.length), 'items with max', this.limit, 'and remaining', this.remainingRequests); - while (Math.min(this.remainingRequests, this.queue.length) > 0) { - const item = this.queue.shift(); - item.request.gen().end((err, res) => { - if (res && res.headers) { - this.limit = res.headers['x-ratelimit-limit']; - this.resetTime = Number(res.headers['x-ratelimit-reset']) * 1000; - this.setCheck((Math.max(500, this.resetTime - Date.now())) + 1000); - } - if (err) { - console.log(err.status, this.remainingRequests); - item.reject(err); - } else { - item.resolve(res && res.body ? res.body : {}); - } - }); - this.remainingRequests--; - } - } - - add(method) { - this.queue.push(method); - this.process(); - } -} - -module.exports = Bucket; diff --git a/src/client/rest/RESTManager.js b/src/client/rest/RESTManager.js index d0275ff44..62f8e971f 100644 --- a/src/client/rest/RESTManager.js +++ b/src/client/rest/RESTManager.js @@ -1,23 +1,21 @@ -const request = require('superagent'); -const Constants = require('../../util/Constants'); const UserAgentManager = require('./UserAgentManager'); const RESTMethods = require('./RESTMethods'); -const Bucket = require('./Bucket'); +const SequentialRequestHandler = require('./RequestHandlers/Sequential'); const APIRequest = require('./APIRequest'); class RESTManager { constructor(client) { this.client = client; - this.buckets = {}; + this.handlers = {}; this.userAgentManager = new UserAgentManager(this); this.methods = new RESTMethods(this); this.rateLimitedEndpoints = {}; } - addToBucket(bucket, apiRequest) { + push(handler, apiRequest) { return new Promise((resolve, reject) => { - bucket.add({ + handler.push({ request: apiRequest, resolve, reject, @@ -26,17 +24,13 @@ class RESTManager { } makeRequest(method, url, auth, data, file) { - /* - file is {file, name} - */ const apiRequest = new APIRequest(this, method, url, auth, data, file); - if (!this.buckets[apiRequest.getBucketName()]) { - console.log('new bucket', apiRequest.getBucketName()); - this.buckets[apiRequest.getBucketName()] = new Bucket(this, 1, 1); + if (!this.handlers[apiRequest.getEndpoint()]) { + this.handlers[apiRequest.getEndpoint()] = new SequentialRequestHandler(this); } - - return this.addToBucket(this.buckets[apiRequest.getBucketName()], apiRequest); + + return this.push(this.handlers[apiRequest.getEndpoint()], apiRequest); } } diff --git a/src/client/rest/RequestHandlers/Batch.js b/src/client/rest/RequestHandlers/Batch.js new file mode 100644 index 000000000..e69de29bb diff --git a/src/client/rest/RequestHandlers/RequestHandler.js b/src/client/rest/RequestHandlers/RequestHandler.js new file mode 100644 index 000000000..32c21234f --- /dev/null +++ b/src/client/rest/RequestHandlers/RequestHandler.js @@ -0,0 +1,34 @@ +/** + * A base class for different types of rate limiting handlers for the REST API. + * @private + */ +module.exports = class RequestHandler { + constructor(restManager) { + /** + * The RESTManager that instantiated this RequestHandler + * @type {RESTManager} + */ + this.restManager = restManager; + + /** + * A list of requests that have yet to be processed. + * @type {Array} + */ + this.queue = []; + } + + /** + * Push a new API request into this bucket + * @param {APIRequest} request the new request to push into the queue + */ + push(request) { + this.queue.push(request); + } + + /** + * Attempts to get this RequestHandler to process its current queue + */ + handle() { + + } +}; diff --git a/src/client/rest/RequestHandlers/Sequential.js b/src/client/rest/RequestHandlers/Sequential.js new file mode 100644 index 000000000..54f66938e --- /dev/null +++ b/src/client/rest/RequestHandlers/Sequential.js @@ -0,0 +1,71 @@ +const RequestHandler = require('./RequestHandler'); + +/** + * Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto + * the next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account, + * but it can be slower. + * @extends {RequestHandler} + */ +module.exports = class SequentialRequestHandler extends RequestHandler { + + constructor(restManager) { + super(restManager); + + /** + * Whether this rate limiter is waiting for a response from a request + * @type {Boolean} + */ + this.waiting = false; + } + + push(request) { + super.push(request); + this.handle(); + } + + /** + * Performs a request then resolves a promise to indicate its readiness for a new request + * @param {APIRequest} item the item to execute + * @returns {Promise} + */ + execute(item) { + return new Promise((resolve, reject) => { + item.request.gen().end((err, res) => { + if (res && res.headers) { + this.requestLimit = res.headers['x-ratelimit-limit']; + this.requestResetTime = Number(res.headers['x-ratelimit-reset']) * 1000; + this.requestRemaining = Number(res.headers['x-ratelimit-remaining']); + } + if (err) { + this.waiting = false; + item.reject(err); + reject(err); + } else { + this.queue.shift(); + const data = res && res.body ? res.body : {}; + item.resolve(data); + if (this.requestRemaining === 0) { + setTimeout(() => { + this.waiting = false; + resolve(data); + }, (this.requestResetTime - Date.now()) + 4000); + } else { + this.waiting = false; + resolve(data); + } + } + }); + }); + } + + handle() { + super.handle(); + if (this.waiting || this.queue.length === 0) { + return; + } + this.waiting = true; + + const item = this.queue[0]; + this.execute(item).then(() => this.handle()).catch(console.log); + } +}; diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 7ef9e523e..059d4d684 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -151,7 +151,8 @@ class WebSocketManager { * Run whenever an error occurs with the WebSocket connection. Tries to reconnect * @returns {null} */ - eventError() { + eventError(e) { + console.log(e); this.tryReconnect(); } diff --git a/test/random.js b/test/random.js index ba89da291..f2b534f21 100644 --- a/test/random.js +++ b/test/random.js @@ -142,8 +142,8 @@ client.on('message', message => { } if (message.content === 'ratelimittest') { - let i = 0; - while (i < 20) { + let i = 1; + while (i <= 20) { message.channel.sendMessage(`Testing my rates, item ${i} of 20`); i++; } From 00be14b5d13b1b5196fd4d8c93defeb2aacad6be Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 18:15:13 +0100 Subject: [PATCH 099/324] Add options.api_request_method --- src/client/rest/RESTManager.js | 13 ++++++++++++- src/util/Constants.js | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/client/rest/RESTManager.js b/src/client/rest/RESTManager.js index 62f8e971f..8a1b0f9e5 100644 --- a/src/client/rest/RESTManager.js +++ b/src/client/rest/RESTManager.js @@ -2,6 +2,7 @@ const UserAgentManager = require('./UserAgentManager'); const RESTMethods = require('./RESTMethods'); const SequentialRequestHandler = require('./RequestHandlers/Sequential'); const APIRequest = require('./APIRequest'); +const Constants = require('../../util/Constants'); class RESTManager { @@ -23,11 +24,21 @@ class RESTManager { }); } + getRequestHandler() { + switch (this.client.options.api_request_method) { + case 'sequential': + return SequentialRequestHandler; + default: + throw Constants.Errors.INVALID_RATE_LIMIT_METHOD; + } + } + makeRequest(method, url, auth, data, file) { const apiRequest = new APIRequest(this, method, url, auth, data, file); if (!this.handlers[apiRequest.getEndpoint()]) { - this.handlers[apiRequest.getEndpoint()] = new SequentialRequestHandler(this); + const RequestHandlerType = this.getRequestHandler(); + this.handlers[apiRequest.getEndpoint()] = new RequestHandlerType(this); } return this.push(this.handlers[apiRequest.getEndpoint()], apiRequest); diff --git a/src/util/Constants.js b/src/util/Constants.js index ae8ba951c..abe9bf778 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -13,6 +13,7 @@ exports.DefaultOptions = { protocol_version: 6, max_message_cache: 200, rest_ws_bridge_timeout: 5000, + api_request_method: 'sequential', }; exports.Status = { @@ -37,6 +38,7 @@ exports.Errors = { BAD_WS_MESSAGE: new Error('a bad message was received from the websocket - bad compression or not json'), TOOK_TOO_LONG: new Error('something took too long to do'), NOT_A_PERMISSION: new Error('that is not a valid permission number'), + INVALID_RATE_LIMIT_METHOD: new Error('unknown rate limiting method'), }; const API = 'https://discordapp.com/api'; From fd64fb0a82ad68a4f0775ac328d6194c779e4a54 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 18:28:43 +0100 Subject: [PATCH 100/324] Use Date headers to offset time differences to fix rate limiting --- src/client/rest/RequestHandlers/Sequential.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/client/rest/RequestHandlers/Sequential.js b/src/client/rest/RequestHandlers/Sequential.js index 54f66938e..d7949b288 100644 --- a/src/client/rest/RequestHandlers/Sequential.js +++ b/src/client/rest/RequestHandlers/Sequential.js @@ -16,6 +16,13 @@ module.exports = class SequentialRequestHandler extends RequestHandler { * @type {Boolean} */ this.waiting = false; + + /** + * The time difference between Discord's Dates and the local computer's Dates. A positive number means the local + * computer's time is ahead of Discord's. + * @type {Number} + */ + this.timeDifference = 0; } push(request) { @@ -35,6 +42,7 @@ module.exports = class SequentialRequestHandler extends RequestHandler { this.requestLimit = res.headers['x-ratelimit-limit']; this.requestResetTime = Number(res.headers['x-ratelimit-reset']) * 1000; this.requestRemaining = Number(res.headers['x-ratelimit-remaining']); + this.timeDifference = Date.now() - new Date(res.headers.date).getTime(); } if (err) { this.waiting = false; @@ -48,7 +56,7 @@ module.exports = class SequentialRequestHandler extends RequestHandler { setTimeout(() => { this.waiting = false; resolve(data); - }, (this.requestResetTime - Date.now()) + 4000); + }, (this.requestResetTime - Date.now()) + this.timeDifference + 1000); } else { this.waiting = false; resolve(data); From f012655e53311fa48afd54c22992b29d95743270 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 18:47:37 +0100 Subject: [PATCH 101/324] Add 429 handling back into Sequential Handler --- src/client/rest/RequestHandlers/Sequential.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/client/rest/RequestHandlers/Sequential.js b/src/client/rest/RequestHandlers/Sequential.js index d7949b288..8d813c46c 100644 --- a/src/client/rest/RequestHandlers/Sequential.js +++ b/src/client/rest/RequestHandlers/Sequential.js @@ -45,9 +45,17 @@ module.exports = class SequentialRequestHandler extends RequestHandler { this.timeDifference = Date.now() - new Date(res.headers.date).getTime(); } if (err) { - this.waiting = false; - item.reject(err); - reject(err); + if (err.status === 429) { + setTimeout(() => { + this.waiting = false; + resolve(); + }, res.headers['retry-after']); + } else { + this.queue.shift(); + this.waiting = false; + item.reject(err); + resolve(err); + } } else { this.queue.shift(); const data = res && res.body ? res.body : {}; @@ -56,7 +64,7 @@ module.exports = class SequentialRequestHandler extends RequestHandler { setTimeout(() => { this.waiting = false; resolve(data); - }, (this.requestResetTime - Date.now()) + this.timeDifference + 1000); + }, (this.requestResetTime - Date.now()) + this.timeDifference - 1000); } else { this.waiting = false; resolve(data); @@ -74,6 +82,6 @@ module.exports = class SequentialRequestHandler extends RequestHandler { this.waiting = true; const item = this.queue[0]; - this.execute(item).then(() => this.handle()).catch(console.log); + this.execute(item).then(() => this.handle()); } }; From c2e3d2b8ca5ebe76fc12a08038bf9251c43bdbac Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 18:47:56 +0100 Subject: [PATCH 102/324] Fix time differences (add 1 second) --- src/client/rest/RequestHandlers/Sequential.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/rest/RequestHandlers/Sequential.js b/src/client/rest/RequestHandlers/Sequential.js index 8d813c46c..c66651918 100644 --- a/src/client/rest/RequestHandlers/Sequential.js +++ b/src/client/rest/RequestHandlers/Sequential.js @@ -64,7 +64,7 @@ module.exports = class SequentialRequestHandler extends RequestHandler { setTimeout(() => { this.waiting = false; resolve(data); - }, (this.requestResetTime - Date.now()) + this.timeDifference - 1000); + }, (this.requestResetTime - Date.now()) + this.timeDifference + 1000); } else { this.waiting = false; resolve(data); From 75ff9fb0960e0f39fda02fdd569b0820a4920bca Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 19:03:06 +0100 Subject: [PATCH 103/324] Comply to the new Rate Limit Headers hammerandchisel/discord-api-docs#108 --- src/client/rest/RESTManager.js | 1 + src/client/rest/RequestHandlers/RequestHandler.js | 12 ++++++++++++ src/client/rest/RequestHandlers/Sequential.js | 11 ++++++++--- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/client/rest/RESTManager.js b/src/client/rest/RESTManager.js index 8a1b0f9e5..87731fca3 100644 --- a/src/client/rest/RESTManager.js +++ b/src/client/rest/RESTManager.js @@ -12,6 +12,7 @@ class RESTManager { this.userAgentManager = new UserAgentManager(this); this.methods = new RESTMethods(this); this.rateLimitedEndpoints = {}; + this.globallyRateLimited = false; } push(handler, apiRequest) { diff --git a/src/client/rest/RequestHandlers/RequestHandler.js b/src/client/rest/RequestHandlers/RequestHandler.js index 32c21234f..8b88bfe63 100644 --- a/src/client/rest/RequestHandlers/RequestHandler.js +++ b/src/client/rest/RequestHandlers/RequestHandler.js @@ -17,6 +17,18 @@ module.exports = class RequestHandler { this.queue = []; } + /** + * Whether or not the client is being rate limited on every endpoint. + * @type {Boolean} + */ + get globalLimit() { + return this.restManager.globallyRateLimited; + } + + set globalLimit(value) { + this.restManager.globallyRateLimited = value; + } + /** * Push a new API request into this bucket * @param {APIRequest} request the new request to push into the queue diff --git a/src/client/rest/RequestHandlers/Sequential.js b/src/client/rest/RequestHandlers/Sequential.js index c66651918..940da844b 100644 --- a/src/client/rest/RequestHandlers/Sequential.js +++ b/src/client/rest/RequestHandlers/Sequential.js @@ -36,7 +36,7 @@ module.exports = class SequentialRequestHandler extends RequestHandler { * @returns {Promise} */ execute(item) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { item.request.gen().end((err, res) => { if (res && res.headers) { this.requestLimit = res.headers['x-ratelimit-limit']; @@ -48,8 +48,12 @@ module.exports = class SequentialRequestHandler extends RequestHandler { if (err.status === 429) { setTimeout(() => { this.waiting = false; + this.globalLimit = false; resolve(); - }, res.headers['retry-after']); + }, res.headers['retry-after'] + 500); + if (res.headers['x-ratelimit-global']) { + this.globalLimit = true; + } } else { this.queue.shift(); this.waiting = false; @@ -58,6 +62,7 @@ module.exports = class SequentialRequestHandler extends RequestHandler { } } else { this.queue.shift(); + this.globalLimit = false; const data = res && res.body ? res.body : {}; item.resolve(data); if (this.requestRemaining === 0) { @@ -76,7 +81,7 @@ module.exports = class SequentialRequestHandler extends RequestHandler { handle() { super.handle(); - if (this.waiting || this.queue.length === 0) { + if (this.waiting || this.queue.length === 0 || this.globalLimit) { return; } this.waiting = true; From ed818d6e7f7c4cace5e947aaf0908c3fa4328c6d Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 19:58:32 +0100 Subject: [PATCH 104/324] Remove GuildDataStore and move towards storing data in Maps --- src/client/ClientDataResolver.js | 2 +- src/client/actions/GuildMemberRemove.js | 2 +- src/client/actions/GuildRoleCreate.js | 4 +- src/client/actions/GuildRoleDelete.js | 4 +- src/client/actions/GuildRoleUpdate.js | 2 +- .../packets/handlers/GuildMemberUpdate.js | 2 +- .../packets/handlers/PresenceUpdate.js | 2 +- .../packets/handlers/VoiceStateUpdate.js | 2 +- src/structures/Guild.js | 84 ++++++------------- src/structures/GuildMember.js | 6 +- src/structures/datastore/ClientDataStore.js | 6 +- src/structures/datastore/GuildDataStore.js | 12 --- test/random.js | 4 +- 13 files changed, 44 insertions(+), 88 deletions(-) delete mode 100644 src/structures/datastore/GuildDataStore.js diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index 188b44eeb..de7584a11 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -92,7 +92,7 @@ class ClientDataResolver { return null; } - return guild.store.get('members', user.id); + return guild.members.get(user.id); } /** diff --git a/src/client/actions/GuildMemberRemove.js b/src/client/actions/GuildMemberRemove.js index f5e965463..29869caf8 100644 --- a/src/client/actions/GuildMemberRemove.js +++ b/src/client/actions/GuildMemberRemove.js @@ -13,7 +13,7 @@ class GuildMemberRemoveAction extends Action { const client = this.client; const guild = client.store.get('guilds', data.guild_id); if (guild) { - let member = guild.store.get('members', data.user.id); + let member = guild.members.get(data.user.id); if (member) { guild._removeMember(member); this.deleted[guild.id + data.user.id] = member; diff --git a/src/client/actions/GuildRoleCreate.js b/src/client/actions/GuildRoleCreate.js index 601e24266..8f21dbe6d 100644 --- a/src/client/actions/GuildRoleCreate.js +++ b/src/client/actions/GuildRoleCreate.js @@ -9,9 +9,9 @@ class GuildRoleCreate extends Action { const guild = client.store.get('guilds', data.guild_id); if (guild) { - const already = guild.store.get('roles', data.role.id); + const already = guild.roles.get(data.role.id); const role = new Role(guild, data.role); - guild.store.add('roles', role); + guild.roles.set(role.id, role); if (!already) { client.emit(Constants.Events.GUILD_ROLE_CREATE, guild, role); diff --git a/src/client/actions/GuildRoleDelete.js b/src/client/actions/GuildRoleDelete.js index e27f81639..c296589e4 100644 --- a/src/client/actions/GuildRoleDelete.js +++ b/src/client/actions/GuildRoleDelete.js @@ -14,9 +14,9 @@ class GuildRoleDeleteAction extends Action { const guild = client.store.get('guilds', data.guild_id); if (guild) { - let exists = guild.store.get('roles', data.role_id); + let exists = guild.roles.get(data.role_id); if (exists) { - guild.store.remove('roles', data.role_id); + guild.roles.remove(data.role_id); this.deleted[guild.id + data.role_id] = exists; this.scheduleForDeletion(guild.id, data.role_id); client.emit(Constants.Events.GUILD_ROLE_DELETE, guild, exists); diff --git a/src/client/actions/GuildRoleUpdate.js b/src/client/actions/GuildRoleUpdate.js index 14a896724..2929ac1f3 100644 --- a/src/client/actions/GuildRoleUpdate.js +++ b/src/client/actions/GuildRoleUpdate.js @@ -12,7 +12,7 @@ class GuildRoleUpdateAction extends Action { if (guild) { let oldRole; - const existingRole = guild.store.get('roles', roleData.id); + const existingRole = guild.roles.get(roleData.id); // exists and not the same if (existingRole && !existingRole.equals(roleData)) { oldRole = cloneObject(existingRole); diff --git a/src/client/websocket/packets/handlers/GuildMemberUpdate.js b/src/client/websocket/packets/handlers/GuildMemberUpdate.js index d5f6f7145..ebc17f75e 100644 --- a/src/client/websocket/packets/handlers/GuildMemberUpdate.js +++ b/src/client/websocket/packets/handlers/GuildMemberUpdate.js @@ -11,7 +11,7 @@ class GuildMemberUpdateHandler extends AbstractHandler { const guild = client.store.get('guilds', data.guild_id); if (guild) { - const member = guild.store.get('members', data.user.id); + const member = guild.members.get(data.user.id); if (member) { guild._updateMember(member, data); } diff --git a/src/client/websocket/packets/handlers/PresenceUpdate.js b/src/client/websocket/packets/handlers/PresenceUpdate.js index 51732c726..39de7bf91 100644 --- a/src/client/websocket/packets/handlers/PresenceUpdate.js +++ b/src/client/websocket/packets/handlers/PresenceUpdate.js @@ -24,7 +24,7 @@ class PresenceUpdateHandler extends AbstractHandler { } if (guild) { - const memberInGuild = guild.store.get('members', user.id); + const memberInGuild = guild.members.get(user.id); if (!memberInGuild) { const member = guild._addMember({ user, diff --git a/src/client/websocket/packets/handlers/VoiceStateUpdate.js b/src/client/websocket/packets/handlers/VoiceStateUpdate.js index de7ac687a..39b946fc0 100644 --- a/src/client/websocket/packets/handlers/VoiceStateUpdate.js +++ b/src/client/websocket/packets/handlers/VoiceStateUpdate.js @@ -11,7 +11,7 @@ class VoiceStateUpdateHandler extends AbstractHandler { const guild = client.store.get('guilds', data.guild_id); if (guild) { - const member = guild.store.get('members', data.user_id); + const member = guild.members.get(data.user_id); if (member) { const oldVoiceChannelMember = cloneObject(member); if (member.voiceChannel && member.voiceChannel.id !== data.channel_id) { diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 0b301f707..d8b9f4854 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -1,6 +1,5 @@ const User = require('./User'); const GuildMember = require('./GuildMember'); -const GuildDataStore = require('./datastore/GuildDataStore'); const Constants = require('../util/Constants'); const Role = require('./Role'); @@ -31,10 +30,22 @@ class Guild { this.client = client; /** - * The data store of the Guild. - * @type {GuildDataStore} + * A Map of members that are in this Guild. The key is the member's ID, the value is the member. + * @type {Map} */ - this.store = new GuildDataStore(); + this.members = new Map(); + + /** + * A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel. + * @type {Map} + */ + this.channels = new Map(); + + /** + * A Map of roles that are in this Guild. The key is the role's ID, the value is the role. + * @type {Map} + */ + this.roles = new Map(); if (!data) { return; @@ -63,7 +74,8 @@ class Guild { } guildUser.joined_at = guildUser.joined_at || 0; - const member = this.store.add('members', new GuildMember(this, guildUser)); + const member = new GuildMember(this, guildUser); + this.members.set(member.id, member); if (this.client.ws.status === Constants.Status.READY && !noEvent) { this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, member); } @@ -81,7 +93,7 @@ class Guild { } _removeMember(guildMember) { - this.store.remove('members', guildMember); + this.members.delete(guildMember.id); } /** @@ -236,7 +248,7 @@ class Guild { this.features = data.features || []; if (data.members) { - this.store.clear('members'); + this.members.clear(); for (const guildUser of data.members) { this._addMember(guildUser); } @@ -246,10 +258,10 @@ class Guild { * The owner of the guild * @type {User} */ - this.owner = this.store.get('members', data.owner_id); + this.owner = this.members.get(data.owner_id); if (data.channels) { - this.store.clear('channels'); + this.channels.clear(); for (const channel of data.channels) { this.client.store.newChannel(channel, this); } @@ -259,12 +271,13 @@ class Guild { * The embed channel of the Guild. * @type {GuildChannel} */ - this.embedChannel = this.store.get('channels', data.embed_channel_id); + this.embedChannel = this.channels.get(data.embed_channel_id); if (data.roles) { - this.store.clear('roles'); + this.roles.clear(); for (const role of data.roles) { - this.store.add('roles', new Role(this, role)); + const newRole = new Role(this, role); + this.roles.set(newRole.id, newRole); } } @@ -280,7 +293,7 @@ class Guild { if (data.voice_states) { for (const voiceState of data.voice_states) { - const member = this.store.get('members', voiceState.user_id); + const member = this.members.get(voiceState.user_id); if (member) { member.serverMute = voiceState.mute; member.serverDeaf = voiceState.deaf; @@ -475,51 +488,6 @@ class Guild { setSplash(splash) { return this.edit({ splash }); } - - /** - * The channels in the guild. - * @type {Array} - * @readonly - */ - get channels() { return this.store.getAsArray('channels'); } - - /** - * A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel - * in the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient. - * @readonly - * @type {Object} - */ - get $channels() { return this.store.data.channels; } - - /** - * The roles in the guild. - * @type {Array} - * @readonly - */ - get roles() { return this.store.getAsArray('roles'); } - - /** - * A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role - * in the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient. - * @readonly - * @type {Object} - */ - get $roles() { return this.store.data.roles; } - - /** - * The members of the guild. - * @type {Array} - * @readonly - */ - get members() { return this.store.getAsArray('members'); } - - /** - * A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member - * in the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient. - * @readonly - * @type {Object} - */ - get $members() { return this.store.data.members; } } module.exports = Guild; diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 20e03cd33..bc38719dd 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -74,14 +74,14 @@ class GuildMember { */ get roles() { const list = []; - const everyoneRole = this.guild.store.get('roles', this.guild.id); + const everyoneRole = this.guild.roles.get(this.guild.id); if (everyoneRole) { list.push(everyoneRole); } for (const roleID of this._roles) { - const role = this.guild.store.get('roles', roleID); + const role = this.guild.roles.get(roleID); if (role) { list.push(role); } @@ -114,7 +114,7 @@ class GuildMember { * @readonly */ get voiceChannel() { - return this.guild.store.get('channels', this.voiceChannelID); + return this.guild.channels.get(this.voiceChannelID); } /** diff --git a/src/structures/datastore/ClientDataStore.js b/src/structures/datastore/ClientDataStore.js index 8c170994e..7c277b8c7 100644 --- a/src/structures/datastore/ClientDataStore.js +++ b/src/structures/datastore/ClientDataStore.js @@ -53,10 +53,10 @@ class ClientDataStore extends AbstractDataStore { if (guild) { if (data.type === Constants.ChannelTypes.text) { channel = new TextChannel(guild, data); - guild.store.add('channels', channel); + guild.channels.set(channel.id, channel); } else if (data.type === Constants.ChannelTypes.voice) { channel = new VoiceChannel(guild, data); - guild.store.add('channels', channel); + guild.channels.set(channel.id, channel); } } } @@ -86,7 +86,7 @@ class ClientDataStore extends AbstractDataStore { killChannel(channel) { this.remove('channels', channel); if (channel instanceof GuildChannel) { - channel.guild.store.remove('channels', channel); + channel.guild.channels.delete(channel.id); } } diff --git a/src/structures/datastore/GuildDataStore.js b/src/structures/datastore/GuildDataStore.js deleted file mode 100644 index bea556765..000000000 --- a/src/structures/datastore/GuildDataStore.js +++ /dev/null @@ -1,12 +0,0 @@ -const AbstractDataStore = require('./AbstractDataStore'); - -class GuildDataStore extends AbstractDataStore { - constructor() { - super(); - - this.register('members'); - this.register('channels'); - } -} - -module.exports = GuildDataStore; diff --git a/test/random.js b/test/random.js index f2b534f21..55a56ccc8 100644 --- a/test/random.js +++ b/test/random.js @@ -121,8 +121,8 @@ client.on('message', message => { if (message.content === 'stats') { let m = ''; - m += `I am aware of ${message.guild.channels.length} channels\n`; - m += `I am aware of ${message.guild.members.length} members`; + m += `I am aware of ${message.guild.channels.size} channels\n`; + m += `I am aware of ${message.guild.members.size} members`; message.channel.sendMessage(m); } From fb55b6dc604d22eea1f4045053584cbac61a9a32 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 20:10:28 +0100 Subject: [PATCH 105/324] Rebuild docs --- docs/docs.json | 2 +- docs/gen/index.js | 7 +++++++ src/client/rest/RequestHandlers/RequestHandler.js | 6 ++++-- src/client/rest/RequestHandlers/Sequential.js | 6 ++++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 5868cdc4b..82c77a53a 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":209},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":210},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":211},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":212},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":213}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":202},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":203},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":204},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":205},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":206},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":207},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":208}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":198},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":199},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":216}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":214},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":215}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":168,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":307,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":363,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":377,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":391,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":405,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":419,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":433,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":447,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":461,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":475,"filename":"Guild.js","path":"src/structures"},"order":79}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":[[[["GuildDataStore"],""]]],"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":175,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":185,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":190,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":249,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":262,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildChannel",">"]]],"readonly":true,"meta":{"lineno":484,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Channel",">"]]],"readonly":true,"meta":{"lineno":492,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":499,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["Role",">"]]],"readonly":true,"meta":{"lineno":507,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":[[["Array",".<"],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":514,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":[[["Object",".<"],["String",", "],["GuildMember",">"]]],"readonly":true,"meta":{"lineno":522,"filename":"Guild.js","path":"src/structures"},"order":85}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":86},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":219}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":217},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":218}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":99},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":196},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":197}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":114}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":117},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":134}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":131}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":135},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":136},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":137},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":138}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":139},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":153},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":157}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":148}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":158},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":200},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":201},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":226},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":227},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":228},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":229},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":234}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":220},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":221},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":222},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":223},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":224},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":225},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":232},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":233}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":159},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":169},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":194},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":195}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":162},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":166}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":170},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":173},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":241},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":243},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":249}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":171},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":172},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":247},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":248}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":11,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":174},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":42,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":179},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":182},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":74,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":183},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":103,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":118,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":154,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":163,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":182,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":18,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":175},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":24,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":176},{"id":"WebSocketManager#store","longname":"WebSocketManager#store","name":"store","scope":"instance","kind":"member","description":"The WebSocketManager datastore","memberof":"WebSocketManager","type":[[[["WebSocketManagerDataStore"],""]]],"meta":{"lineno":29,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":177},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":178},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":47,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":180},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":52,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":181}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":191},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":192},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":193}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":215},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":216},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":217},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":218},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":219}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":208},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":209},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":210},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":211},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":212},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":213},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":214}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":204},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":205},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":222}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":220},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":221}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":81}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":68}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":82},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":225}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":223},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":224}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":95},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":202},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":203}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":110}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":113},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":130}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":127}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":133},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":134}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":135},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":153}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":144}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":154},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":240}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":226},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":227},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":228},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":229},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":238},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":239}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":155},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":200},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":201}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":162}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":247},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":248},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":249},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":255}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":241},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":243},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":253},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":254}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":170},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":174,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":175,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":171},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":172},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":173}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","meta":{"lineno":9,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":176},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":38,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":259,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":260,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":18,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":177},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":178},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":256},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":257},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":258}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":11,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":180},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":42,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":74,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":103,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":118,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":154,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":164,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":183,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":18,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":181},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":24,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":182},{"id":"WebSocketManager#store","longname":"WebSocketManager#store","name":"store","scope":"instance","kind":"member","description":"The WebSocketManager datastore","memberof":"WebSocketManager","type":[[[["WebSocketManagerDataStore"],""]]],"meta":{"lineno":29,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":183},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":47,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":52,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":197},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":198},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":199}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js index a4f1a0160..d031b9fc3 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -83,6 +83,13 @@ function clean() { } else if (item.kind === 'function' && item.memberof) { const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; const newReturns = []; + if (!item.returns) { + item.returns = [{ + type: { + names: ['null'], + }, + }]; + } for (const name of item.returns[0].type.names) { newReturns.push(matchReturnName(name)); } diff --git a/src/client/rest/RequestHandlers/RequestHandler.js b/src/client/rest/RequestHandlers/RequestHandler.js index 8b88bfe63..8cf39c8bd 100644 --- a/src/client/rest/RequestHandlers/RequestHandler.js +++ b/src/client/rest/RequestHandlers/RequestHandler.js @@ -2,7 +2,7 @@ * A base class for different types of rate limiting handlers for the REST API. * @private */ -module.exports = class RequestHandler { +class RequestHandler { constructor(restManager) { /** * The RESTManager that instantiated this RequestHandler @@ -43,4 +43,6 @@ module.exports = class RequestHandler { handle() { } -}; +} + +module.exports = RequestHandler; diff --git a/src/client/rest/RequestHandlers/Sequential.js b/src/client/rest/RequestHandlers/Sequential.js index 940da844b..edf8f6bfe 100644 --- a/src/client/rest/RequestHandlers/Sequential.js +++ b/src/client/rest/RequestHandlers/Sequential.js @@ -6,7 +6,7 @@ const RequestHandler = require('./RequestHandler'); * but it can be slower. * @extends {RequestHandler} */ -module.exports = class SequentialRequestHandler extends RequestHandler { +class SequentialRequestHandler extends RequestHandler { constructor(restManager) { super(restManager); @@ -89,4 +89,6 @@ module.exports = class SequentialRequestHandler extends RequestHandler { const item = this.queue[0]; this.execute(item).then(() => this.handle()); } -}; +} + +module.exports = SequentialRequestHandler; From 97e16e6eedd410df63fd602f7bf000526b3700b4 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 20:11:42 +0100 Subject: [PATCH 106/324] Make SequentialRequestHandler private --- docs/docs.json | 2 +- src/client/rest/RequestHandlers/Sequential.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 82c77a53a..8999a8fcb 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":215},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":216},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":217},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":218},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":219}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":208},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":209},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":210},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":211},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":212},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":213},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":214}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":204},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":205},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":222}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":220},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":221}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":81}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":68}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":82},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":225}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":223},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":224}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":95},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":202},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":203}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":110}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":113},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":130}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":127}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":133},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":134}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":135},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":153}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":144}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":154},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":240}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":226},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":227},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":228},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":229},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":238},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":239}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":155},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":200},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":201}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":162}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":247},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":248},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":249},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":255}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":241},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":243},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":253},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":254}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":170},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":174,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":175,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":171},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":172},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":173}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","meta":{"lineno":9,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":176},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":38,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":259,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":260,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":18,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":177},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":178},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":256},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":257},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":258}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":11,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":180},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":42,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":74,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":103,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":118,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":154,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":164,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":183,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":18,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":181},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":24,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":182},{"id":"WebSocketManager#store","longname":"WebSocketManager#store","name":"store","scope":"instance","kind":"member","description":"The WebSocketManager datastore","memberof":"WebSocketManager","type":[[[["WebSocketManagerDataStore"],""]]],"meta":{"lineno":29,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":183},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":47,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":52,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":197},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":198},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":199}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":215},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":216},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":217},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":218},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":219}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":208},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":209},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":210},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":211},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":212},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":213},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":214}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":204},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":205},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":222}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":220},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":221}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":81}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":68}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":82},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":225}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":223},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":224}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":95},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":202},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":203}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":110}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":113},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":130}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":127}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":133},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":134}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":135},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":153}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":144}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":154},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":240}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":226},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":227},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":228},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":229},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":238},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":239}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":155},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":200},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":201}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":162}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":247},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":248},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":249},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":255}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":241},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":243},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":253},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":254}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":170},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":174,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":175,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":171},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":172},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":173}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":176},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":259,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":260,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":177},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":178},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":256},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":257},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":258}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":11,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":180},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":42,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":74,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":103,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":118,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":154,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":164,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":183,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":18,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":181},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":24,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":182},{"id":"WebSocketManager#store","longname":"WebSocketManager#store","name":"store","scope":"instance","kind":"member","description":"The WebSocketManager datastore","memberof":"WebSocketManager","type":[[[["WebSocketManagerDataStore"],""]]],"meta":{"lineno":29,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":183},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":47,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":52,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":197},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":198},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":199}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file diff --git a/src/client/rest/RequestHandlers/Sequential.js b/src/client/rest/RequestHandlers/Sequential.js index edf8f6bfe..55d042880 100644 --- a/src/client/rest/RequestHandlers/Sequential.js +++ b/src/client/rest/RequestHandlers/Sequential.js @@ -5,6 +5,7 @@ const RequestHandler = require('./RequestHandler'); * the next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account, * but it can be slower. * @extends {RequestHandler} + * @private */ class SequentialRequestHandler extends RequestHandler { From 4f4ec3146b21f74d58c90723f2956059c359bb0a Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 21:11:40 +0100 Subject: [PATCH 107/324] Store Channel Messages in Maps --- docs/docs.json | 2 +- src/client/actions/MessageDelete.js | 4 ++-- src/client/actions/MessageUpdate.js | 2 +- src/structures/DMChannel.js | 14 +++++++------- src/structures/TextChannel.js | 12 ++++++------ src/structures/interface/TextBasedChannel.js | 8 ++++++++ 6 files changed, 25 insertions(+), 17 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 8999a8fcb..9c835df74 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":215},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":216},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":217},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":218},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":219}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":208},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":209},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":210},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":211},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":212},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":213},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":214}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":11,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":204},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":205},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":222}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":220},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":221}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":81}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":68}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":82},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":225}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":223},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":224}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":95},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":202},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":203}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":110}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":113},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":130}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":127}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":133},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":134}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":135},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":153}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":144}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":154},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":240}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":226},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":227},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":228},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":229},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":238},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":239}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":155},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":200},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":201}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":162}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":247},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":248},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":249},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":255}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":241},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":243},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":253},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":254}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":170},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":174,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":175,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":171},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":172},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":173}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":176},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":259,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":260,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":177},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":178},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":256},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":257},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":258}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":11,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":180},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":42,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":74,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":103,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":118,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":154,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":164,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":183,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":18,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":181},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":24,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":182},{"id":"WebSocketManager#store","longname":"WebSocketManager#store","name":"store","scope":"instance","kind":"member","description":"The WebSocketManager datastore","memberof":"WebSocketManager","type":[[[["WebSocketManagerDataStore"],""]]],"meta":{"lineno":29,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":183},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":47,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":52,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":197},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":198},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":199}],"properties":[],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":218},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":219},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":220},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":221},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":222}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":211},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":212},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":213},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":214},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":215},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":216},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":217}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":225}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":205},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":223},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":224}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":81}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":68}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":82},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":228}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":226},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":227}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":95},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":203},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":204}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":110}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":113},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":130}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":127}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":133},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":134}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":135},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":153}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":144}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":154},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":243}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":229},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":241},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":242}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":155},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":201},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":202}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":162}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":255},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":258}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":247},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":248},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":249},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":256},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":257}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":170},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":174,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":175,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":171},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":172},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":173}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":176},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":262,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":263,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":177},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":178},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":259},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":260},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":261}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":11,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":180},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":42,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":74,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":103,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":118,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":154,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":164,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":183,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":18,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":181},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":24,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":182},{"id":"WebSocketManager#store","longname":"WebSocketManager#store","name":"store","scope":"instance","kind":"member","description":"The WebSocketManager datastore","memberof":"WebSocketManager","type":[[[["WebSocketManagerDataStore"],""]]],"meta":{"lineno":29,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":183},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":47,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":52,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":197},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":199},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":200}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":198}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file diff --git a/src/client/actions/MessageDelete.js b/src/client/actions/MessageDelete.js index bbd9e00e3..448691672 100644 --- a/src/client/actions/MessageDelete.js +++ b/src/client/actions/MessageDelete.js @@ -12,10 +12,10 @@ class MessageDeleteAction extends Action { const client = this.client; const channel = client.store.get('channels', data.channel_id); if (channel) { - let message = channel.store.get('messages', data.id); + let message = channel.messages.get(data.id); if (message) { - channel.store.remove('messages', message.id); + channel.messages.delete(message.id); this.deleted[channel.id + message.id] = message; this.scheduleForDeletion(channel.id, message.id); } else if (this.deleted[channel.id + data.id]) { diff --git a/src/client/actions/MessageUpdate.js b/src/client/actions/MessageUpdate.js index 3d5854ba9..58fd95870 100644 --- a/src/client/actions/MessageUpdate.js +++ b/src/client/actions/MessageUpdate.js @@ -9,7 +9,7 @@ class MessageUpdateAction extends Action { const channel = client.store.get('channels', data.channel_id); if (channel) { - const message = channel.store.get('messages', data.id); + const message = channel.messages.get(data.id); if (message && !message.equals(data, true)) { const oldMessage = cloneObject(message); message.patch(data); diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 14247b474..dd6a39cc4 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -1,7 +1,6 @@ const Channel = require('./Channel'); const TextBasedChannel = require('./interface/TextBasedChannel'); const User = require('./User'); -const TextChannelDataStore = require('./datastore/TextChannelDataStore'); /** * Represents a Direct Message Channel between two users. @@ -11,22 +10,23 @@ const TextChannelDataStore = require('./datastore/TextChannelDataStore'); class DMChannel extends Channel { constructor(client, data) { super(client, data); - this.store = new TextChannelDataStore(); + this.messages = new Map(); } _cacheMessage(message) { const maxSize = this.client.options.max_message_cache; if (maxSize === 0) { // saves on performance - return; + return null; } - const storeKeys = Object.keys(this.store); - if (storeKeys.length >= maxSize) { - this.store.remove(storeKeys[0]); + if (this.messages.size >= maxSize) { + this.messages.delete(Array.from(this.messages.keys())[0]); } - this.store.add('messages', message); + this.messages.set(message.id, message); + + return message; } setup(data) { diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 5762ef5a9..93f2e3b8d 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -1,5 +1,4 @@ const GuildChannel = require('./GuildChannel'); -const TextChannelDataStore = require('./datastore/TextChannelDataStore'); const TextBasedChannel = require('./interface/TextBasedChannel'); /** @@ -11,7 +10,7 @@ class TextChannel extends GuildChannel { constructor(guild, data) { super(guild, data); - this.store = new TextChannelDataStore(); + this.messages = new Map(); } _cacheMessage(message) { @@ -21,12 +20,13 @@ class TextChannel extends GuildChannel { return null; } - const storeKeys = Object.keys(this.store); - if (storeKeys.length >= maxSize) { - this.store.remove(storeKeys[0]); + if (this.messages.size >= maxSize) { + this.messages.delete(Array.from(this.messages.keys())[0]); } - return this.store.add('messages', message); + this.messages.set(message.id, message); + + return message; } sendMessage() { diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 974a4d432..684a718c0 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -3,6 +3,14 @@ * @interface */ class TextBasedChannel { + + constructor() { + /** + * A Map containing the messages sent to this channel. + * @type {Map} + */ + this.messages = new Map(); + } /** * Send a message to this channel * @param {String} content the content to send From 4400eb1b5cbc21cf8faa6698723c44f40255d607 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 21:19:50 +0100 Subject: [PATCH 108/324] Moved _cacheMessage to TextBasedChannel to avoid repeating code --- docs/docs.json | 2 +- src/structures/DMChannel.js | 22 +++++--------------- src/structures/TextChannel.js | 22 +++++--------------- src/structures/interface/TextBasedChannel.js | 21 +++++++++++++++++-- 4 files changed, 30 insertions(+), 37 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 9c835df74..9b129b818 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":218},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":219},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":220},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":221},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":222}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":211},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":212},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":213},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":214},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":215},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":216},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":217}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":51,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":225}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":38,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":43,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":205},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":223},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":224}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":81}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":68}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":82},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":228}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":226},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":227}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":95},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":203},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":204}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":110}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":113},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":130}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":127}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":133},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":134}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":135},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":153}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":144}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":154},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":243}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":229},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":241},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":242}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":155},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":201},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":202}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":162}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":255},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":258}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":247},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":248},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":249},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":256},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":257}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":170},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":174,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":175,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":171},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":172},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":173}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":176},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":262,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":263,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":177},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":178},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":259},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":260},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":261}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":11,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":180},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":42,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":74,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":103,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":118,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":154,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":164,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":183,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":18,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":181},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":24,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":182},{"id":"WebSocketManager#store","longname":"WebSocketManager#store","name":"store","scope":"instance","kind":"member","description":"The WebSocketManager datastore","memberof":"WebSocketManager","type":[[[["WebSocketManagerDataStore"],""]]],"meta":{"lineno":29,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":183},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":47,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":52,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":197},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":199},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":200}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":198}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":218},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":219},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":220},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":221},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":222}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":211},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":212},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":213},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":214},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":215},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":216},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":217}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":35,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":225}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":22,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":27,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":205},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":223},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":224}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":81}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":68}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":82},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":228}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":226},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":227}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":95},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":203},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":204}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":110}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":113},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":130}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":127}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":133},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":134}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":135},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":153}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":144}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":154},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":243}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":229},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":241},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":242}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":155},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":201},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":202}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":162}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":255},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":258}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":247},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":248},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":249},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":256},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":257}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":170},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":174,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":175,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":171},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":172},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":173}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":176},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":262,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":263,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":177},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":178},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":259},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":260},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":261}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":11,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":180},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":42,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":74,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":103,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":118,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":154,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":164,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":183,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":18,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":181},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":24,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":182},{"id":"WebSocketManager#store","longname":"WebSocketManager#store","name":"store","scope":"instance","kind":"member","description":"The WebSocketManager datastore","memberof":"WebSocketManager","type":[[[["WebSocketManagerDataStore"],""]]],"meta":{"lineno":29,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":183},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":47,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":52,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":197},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":199},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":200}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":198}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index dd6a39cc4..5676b66ac 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -13,22 +13,6 @@ class DMChannel extends Channel { this.messages = new Map(); } - _cacheMessage(message) { - const maxSize = this.client.options.max_message_cache; - if (maxSize === 0) { - // saves on performance - return null; - } - - if (this.messages.size >= maxSize) { - this.messages.delete(Array.from(this.messages.keys())[0]); - } - - this.messages.set(message.id, message); - - return message; - } - setup(data) { super.setup(data); /** @@ -59,8 +43,12 @@ class DMChannel extends Channel { sendTTSMessage() { return; } + + _cacheMessage() { + return; + } } -TextBasedChannel.applyToClass(DMChannel); +TextBasedChannel.applyToClass(DMChannel, true); module.exports = DMChannel; diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 93f2e3b8d..9df132319 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -13,22 +13,6 @@ class TextChannel extends GuildChannel { this.messages = new Map(); } - _cacheMessage(message) { - const maxSize = this.client.options.max_message_cache; - if (maxSize === 0) { - // saves on performance - return null; - } - - if (this.messages.size >= maxSize) { - this.messages.delete(Array.from(this.messages.keys())[0]); - } - - this.messages.set(message.id, message); - - return message; - } - sendMessage() { return; } @@ -36,8 +20,12 @@ class TextChannel extends GuildChannel { sendTTSMessage() { return; } + + _cacheMessage() { + return; + } } -TextBasedChannel.applyToClass(TextChannel); +TextBasedChannel.applyToClass(TextChannel, true); module.exports = TextChannel; diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 684a718c0..d96fd824c 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -38,14 +38,31 @@ class TextBasedChannel { sendTTSMessage(content) { return this.client.rest.methods.sendMessage(this, content, true); } + + _cacheMessage(message) { + const maxSize = this.client.options.max_message_cache; + if (maxSize === 0) { + // saves on performance + return null; + } + + if (this.messages.size >= maxSize) { + this.messages.delete(Array.from(this.messages.keys())[0]); + } + + this.messages.set(message.id, message); + + return message; + } } function applyProp(structure, prop) { structure.prototype[prop] = TextBasedChannel.prototype[prop]; } -exports.applyToClass = structure => { - for (const prop of ['sendMessage', 'sendTTSMessage']) { +exports.applyToClass = (structure, full = false) => { + const props = full ? ['sendMessage', 'sendTTSMessage', '_cacheMessage'] : ['sendMessage', 'sendTTSMessage']; + for (const prop of props) { applyProp(structure, prop); } }; From bd50e3c0a5c88d5ecf5b26d0431764e9b823e7af Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 21:29:03 +0100 Subject: [PATCH 109/324] Remove VoiceChannel store and add members map --- docs/docs.json | 2 +- .../websocket/packets/handlers/VoiceStateUpdate.js | 2 +- src/structures/VoiceChannel.js | 7 +++++-- src/structures/datastore/TextChannelDataStore.js | 10 ---------- src/structures/datastore/VoiceChannelDataStore.js | 10 ---------- 5 files changed, 7 insertions(+), 24 deletions(-) delete mode 100644 src/structures/datastore/TextChannelDataStore.js delete mode 100644 src/structures/datastore/VoiceChannelDataStore.js diff --git a/docs/docs.json b/docs/docs.json index 9b129b818..82a4ba934 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":218},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":219},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":220},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":221},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":222}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":211},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":212},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":213},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":214},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":215},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":216},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":217}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":35,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":225}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":22,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":27,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":205},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":223},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":224}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":81}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":68}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":82},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":228}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":226},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":227}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":95},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":203},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":204}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":110}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":113},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":130}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":127}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":133},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":134}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":135},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":153}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":144}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":154},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":243}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":229},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":241},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":242}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":155},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":201},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":202}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":162}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":38,"filename":"VoiceChannel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":255},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":258}],"properties":[{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":20,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":25,"filename":"VoiceChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":247},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":248},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":249},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":256},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":257}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":170},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":174,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":175,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":171},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":172},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":173}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":176},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":262,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":263,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":177},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":178},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":259},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":260},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":261}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":11,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":180},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":42,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":74,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":103,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":118,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":154,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":164,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":183,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":18,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":181},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":24,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":182},{"id":"WebSocketManager#store","longname":"WebSocketManager#store","name":"store","scope":"instance","kind":"member","description":"The WebSocketManager datastore","memberof":"WebSocketManager","type":[[[["WebSocketManagerDataStore"],""]]],"meta":{"lineno":29,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":183},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":47,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":52,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":197},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":199},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":200}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":198}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":219},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":220},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":221},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":222},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":223}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":212},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":213},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":214},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":215},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":216},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":217},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":218}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":35,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":226}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":22,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":27,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":224},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":225}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":81}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":68}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":82},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":229}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":227},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":228}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":95},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":204},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":205}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":110}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":113},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":130}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":127}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":133},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":134}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":135},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":153}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":144}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":154},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":211},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":241},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":244}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":242},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":243}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":155},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":202},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":203}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":162}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":170},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":255},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":256},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":259}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":247},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":248},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":249},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":257},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":258}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":171},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":175,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":176,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":172},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":173},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":174}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":177},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":180},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":263,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":264,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":178},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":260},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":261},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":262}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":11,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":181},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":42,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":74,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":103,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":118,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":154,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":164,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":183,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":197}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":18,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":182},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":24,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":183},{"id":"WebSocketManager#store","longname":"WebSocketManager#store","name":"store","scope":"instance","kind":"member","description":"The WebSocketManager datastore","memberof":"WebSocketManager","type":[[[["WebSocketManagerDataStore"],""]]],"meta":{"lineno":29,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":47,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":52,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":198},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":200},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":201}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":199}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file diff --git a/src/client/websocket/packets/handlers/VoiceStateUpdate.js b/src/client/websocket/packets/handlers/VoiceStateUpdate.js index 39b946fc0..9145888c4 100644 --- a/src/client/websocket/packets/handlers/VoiceStateUpdate.js +++ b/src/client/websocket/packets/handlers/VoiceStateUpdate.js @@ -15,7 +15,7 @@ class VoiceStateUpdateHandler extends AbstractHandler { if (member) { const oldVoiceChannelMember = cloneObject(member); if (member.voiceChannel && member.voiceChannel.id !== data.channel_id) { - member.voiceChannel.store.remove('members', oldVoiceChannelMember); + member.voiceChannel.members.delete(oldVoiceChannelMember.id); } member.serverMute = data.mute; diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index 41c36c519..eef063765 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -1,5 +1,4 @@ const GuildChannel = require('./GuildChannel'); -const VoiceChannelDataStore = require('./datastore/VoiceChannelDataStore'); /** * Represents a Server Voice Channel on Discord. @@ -8,7 +7,11 @@ const VoiceChannelDataStore = require('./datastore/VoiceChannelDataStore'); class VoiceChannel extends GuildChannel { constructor(guild, data) { super(guild, data); - this.store = new VoiceChannelDataStore(); + /** + * The members in this Voice Channel. + * @type {Map} + */ + this.members = new Map(); } setup(data) { diff --git a/src/structures/datastore/TextChannelDataStore.js b/src/structures/datastore/TextChannelDataStore.js deleted file mode 100644 index 1cf54a825..000000000 --- a/src/structures/datastore/TextChannelDataStore.js +++ /dev/null @@ -1,10 +0,0 @@ -const AbstractDataStore = require('./AbstractDataStore'); - -class TextChannelDataStore extends AbstractDataStore { - constructor() { - super(); - this.register('messages'); - } -} - -module.exports = TextChannelDataStore; diff --git a/src/structures/datastore/VoiceChannelDataStore.js b/src/structures/datastore/VoiceChannelDataStore.js deleted file mode 100644 index 9705d5c77..000000000 --- a/src/structures/datastore/VoiceChannelDataStore.js +++ /dev/null @@ -1,10 +0,0 @@ -const AbstractDataStore = require('./AbstractDataStore'); - -class VoiceChannelDataStore extends AbstractDataStore { - constructor() { - super(); - this.register('members'); - } -} - -module.exports = VoiceChannelDataStore; From ad8b4c76984b1899788ee133fbd66b3994e475a2 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 21:37:23 +0100 Subject: [PATCH 110/324] Remove WebSocket datastore - move directly to WebSocketManager --- docs/docs.json | 2 +- src/client/websocket/WebSocketManager.js | 22 ++++++++++++------- .../packets/WebSocketPacketManager.js | 4 ++-- .../websocket/packets/handlers/Ready.js | 2 +- .../datastore/WebSocketManagerDataStore.js | 12 ---------- 5 files changed, 18 insertions(+), 24 deletions(-) delete mode 100644 src/structures/datastore/WebSocketManagerDataStore.js diff --git a/docs/docs.json b/docs/docs.json index 82a4ba934..947c517b5 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":219},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":220},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":221},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":222},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":223}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":212},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":213},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":214},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":215},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":216},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":217},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":218}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":35,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":226}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":22,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":27,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":224},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":225}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":81}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":68}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":82},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":229}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":227},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":228}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":95},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":204},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":205}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":110}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":113},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":130}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":127}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":133},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":134}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":135},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":153}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":144}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":154},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":211},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":241},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":244}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":242},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":243}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":155},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":202},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":203}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":162}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":170},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":255},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":256},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":259}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":247},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":248},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":249},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":257},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":258}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":171},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":175,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":176,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":172},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":173},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":174}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":177},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":180},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":263,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":264,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":178},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":260},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":261},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":262}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":11,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":181},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":42,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":74,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":103,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":118,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":154,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":164,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":183,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":197}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":18,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":182},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":24,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":183},{"id":"WebSocketManager#store","longname":"WebSocketManager#store","name":"store","scope":"instance","kind":"member","description":"The WebSocketManager datastore","memberof":"WebSocketManager","type":[[[["WebSocketManagerDataStore"],""]]],"meta":{"lineno":29,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":47,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":52,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":198},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":200},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":201}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":199}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":220},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":221},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":222},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":223},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":224}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":213},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":214},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":215},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":216},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":217},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":218},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":219}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":35,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":227}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":22,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":27,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":225},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":226}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":81}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":68}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":82},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":230}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":228},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":229}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":95},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":205},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":110}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":113},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":130}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":127}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":133},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":134}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":135},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":153}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":144}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":154},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":211},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":212},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":241},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":245}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":243},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":244}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":155},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":203},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":204}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":162}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":170},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":255},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":256},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":257},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":260}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":247},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":248},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":249},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":258},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":259}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":171},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":175,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":176,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":172},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":173},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":174}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":177},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":180},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":264,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":265,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":178},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":261},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":262},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":263}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":181},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":48,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":70,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":80,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":92,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":109,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":124,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":136,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":160,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":170,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":197},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":189,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":198}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":182},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":183},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":53,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":58,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":199},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":201},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":202}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":200}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 059d4d684..0892997b7 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -2,7 +2,6 @@ const WebSocket = require('ws'); const Constants = require('../../util/Constants'); const zlib = require('zlib'); const PacketManager = require('./packets/WebSocketPacketManager'); -const WebSocketManagerDataStore = require('../../structures/datastore/WebSocketManagerDataStore'); /** * The WebSocket Manager of the Client @@ -22,16 +21,23 @@ class WebSocketManager { * @type {PacketManager} */ this.packetManager = new PacketManager(this); - /** - * The WebSocketManager datastore - * @type {WebSocketManagerDataStore} - */ - this.store = new WebSocketManagerDataStore(); /** * The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE. * @type {Number} */ this.status = Constants.Status.IDLE; + + /** + * The session ID of the connection, null if not yet available. + * @type {?String} + */ + this.sessionID = null; + + /** + * The packet count of the client, null if not yet available. + * @type {?Number} + */ + this.sequence = -1; } /** @@ -86,8 +92,8 @@ class WebSocketManager { _sendResume() { const payload = { token: this.client.store.token, - session_id: this.store.sessionID, - seq: this.store.sequence, + session_id: this.sessionID, + seq: this.sequence, }; this.send({ diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index dd8615637..7511c1be4 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -55,8 +55,8 @@ class WebSocketPacketManager { } setSequence(s) { - if (s && s > this.ws.store.sequence) { - this.ws.store.sequence = s; + if (s && s > this.ws.sequence) { + this.ws.sequence = s; } } diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index f49a8aa63..065a42d56 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -19,7 +19,7 @@ class ReadyHandler extends AbstractHandler { client.store.newChannel(privateDM); } - this.packetManager.ws.store.sessionID = data.session_id; + this.packetManager.ws.sessionID = data.session_id; this.packetManager.ws.checkIfReady(); } diff --git a/src/structures/datastore/WebSocketManagerDataStore.js b/src/structures/datastore/WebSocketManagerDataStore.js deleted file mode 100644 index 82f8d94c4..000000000 --- a/src/structures/datastore/WebSocketManagerDataStore.js +++ /dev/null @@ -1,12 +0,0 @@ -const AbstractDataStore = require('./AbstractDataStore'); - -class WebSocketManagerDataStore extends AbstractDataStore { - constructor() { - super(); - this.sessionID = null; - this.sequence = -1; - this.gateway = null; - } -} - -module.exports = WebSocketManagerDataStore; From 82ab92ca2a11e29ddd5031c0c334451783414165 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 22:21:30 +0100 Subject: [PATCH 111/324] Migrate most of the Client Data Store to Clien --- docs/docs.json | 2 +- src/client/Client.js | 16 ++++++++++++ src/client/ClientDataResolver.js | 4 +-- src/client/actions/ChannelDelete.js | 2 +- src/client/actions/ChannelUpdate.js | 2 +- src/client/actions/GuildDelete.js | 4 +-- src/client/actions/GuildMemberRemove.js | 2 +- src/client/actions/GuildRoleCreate.js | 2 +- src/client/actions/GuildRoleDelete.js | 2 +- src/client/actions/GuildRoleUpdate.js | 2 +- src/client/actions/GuildUpdate.js | 2 +- src/client/actions/MessageCreate.js | 2 +- src/client/actions/MessageDelete.js | 2 +- src/client/actions/MessageUpdate.js | 2 +- src/client/rest/RESTMethods.js | 2 +- src/client/websocket/WebSocketManager.js | 6 ++--- .../websocket/packets/handlers/GuildBanAdd.js | 4 +-- .../packets/handlers/GuildBanRemove.js | 4 +-- .../websocket/packets/handlers/GuildCreate.js | 2 +- .../packets/handlers/GuildMemberAdd.js | 2 +- .../packets/handlers/GuildMemberUpdate.js | 2 +- .../packets/handlers/GuildMembersChunk.js | 2 +- .../packets/handlers/PresenceUpdate.js | 4 +-- .../websocket/packets/handlers/Ready.js | 7 +++--- .../websocket/packets/handlers/TypingStart.js | 4 +-- .../packets/handlers/VoiceStateUpdate.js | 2 +- src/structures/DMChannel.js | 3 ++- src/structures/Guild.js | 2 +- src/structures/Message.js | 6 ++--- src/structures/datastore/ClientDataStore.js | 25 +++++++++---------- test/random.js | 7 ++++-- 31 files changed, 75 insertions(+), 55 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 947c517b5..6fe65c205 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":80,"filename":"Client.js","path":"src/client"},"order":7}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":8}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":9},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":11},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":21}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":22},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":25},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":26}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":23},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":24}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":27},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":30}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":28},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":29}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":31},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":34},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":220},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":221},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":222},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":223},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":224}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":32},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":33},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":213},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":214},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":215},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":216},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":217},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":218},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":219}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":38},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":35,"filename":"DMChannel.js","path":"src/structures"},"order":41},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":227}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":22,"filename":"DMChannel.js","path":"src/structures"},"order":39},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":27,"filename":"DMChannel.js","path":"src/structures"},"order":40},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":225},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":226}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":42},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":81}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":68}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":82},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":230}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":83},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":84},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":85},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":228},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":229}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":95},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":205},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":96},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":97},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":98},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":110}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":113},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":130}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":114},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":115},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":116},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":127}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":131},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":132},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":133},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":134}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":135},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":153}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":136},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":137},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":138},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":144}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":154},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":211},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":212},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":241},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":245}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":243},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":244}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":155},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":203},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":204}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":156},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":157},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":158},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":162}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":166},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":170},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":255},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":256},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":257},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":260}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":167},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":168},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":169},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":247},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":248},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":249},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":258},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":259}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":171},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":175,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":176,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":172},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":173},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":174}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":177},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":180},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":264,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":265,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":178},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":261},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":262},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":263}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":181},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":48,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":70,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":80,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":92,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":109,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":124,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":136,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":160,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":170,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":197},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":189,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":198}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":182},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":183},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":53,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":58,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":199},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":201},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":202}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":200}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":10},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":20}}}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":96,"filename":"Client.js","path":"src/client"},"order":10}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":64,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":69,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":74,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":109,"filename":"Client.js","path":"src/client"},"order":11}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":24}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":25},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":28},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":29}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":26},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":27}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":30},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":33}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":31},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":32}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":34},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":38},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":39},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":223},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":224},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":225},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":226},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":227}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":216},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":217},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":218},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":219},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":220},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":221},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":222}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":41},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":44},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":211},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":212},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":230}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":42},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":43},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":228},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":229}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":45},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":84}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":71}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":85},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":233}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":231},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":232}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":98},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":113}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":116},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":133}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":130}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":134},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":135},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":136},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":137}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":138},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":153},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":156}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":147}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":157},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":214},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":215},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":241},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":243},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":248}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":213},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":246},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":247}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":158},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":162},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":165}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":169},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":173},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":255},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":256},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":257},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":258},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":259},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":260},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":263}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":170},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":171},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":172},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":249},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":261},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":262}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":174},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":178,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":179,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":175},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":176},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":177}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":180},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":183},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":267,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":268,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":181},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":182},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":264},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":265},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":266}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":48,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":70,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":80,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":92,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":109,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":124,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":197},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":136,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":198},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":160,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":199},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":170,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":200},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":189,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":201}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":53,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":58,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":202},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":204},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":205}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":203}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":23}}}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index be82d50f4..66c35f4fc 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -56,6 +56,22 @@ class Client extends EventEmitter { * @private */ this.actions = new ActionsManager(this); + + /** + * A map of the Client's stored users + * @type {Map} + */ + this.users = new Map(); + /** + * A map of the Client's stored guilds + * @type {Map} + */ + this.guilds = new Map(); + /** + * A map of the Client's stored channels + * @type {Map} + */ + this.channels = new Map(); } /** diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index de7584a11..3b0c8d553 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -38,7 +38,7 @@ class ClientDataResolver { if (user instanceof User) { return user; } else if ($string(user)) { - return this.client.store.get('users', user); + return this.client.users.get(user.id); } else if (user instanceof Message) { return user.author; } else if (user instanceof Guild) { @@ -133,7 +133,7 @@ class ClientDataResolver { } if ($string(channel)) { - return this.client.store.get('channels', channel); + return this.client.channels.get(channel.id); } return null; diff --git a/src/client/actions/ChannelDelete.js b/src/client/actions/ChannelDelete.js index 5ecd5c03d..58b7bff5a 100644 --- a/src/client/actions/ChannelDelete.js +++ b/src/client/actions/ChannelDelete.js @@ -10,7 +10,7 @@ class ChannelDeleteAction extends Action { handle(data) { const client = this.client; - let channel = client.store.get('channels', data.id); + let channel = client.channels.get(data.id); if (channel) { client.store.killChannel(channel); diff --git a/src/client/actions/ChannelUpdate.js b/src/client/actions/ChannelUpdate.js index f7a855b6b..799047306 100644 --- a/src/client/actions/ChannelUpdate.js +++ b/src/client/actions/ChannelUpdate.js @@ -6,7 +6,7 @@ class ChannelUpdateAction extends Action { handle(data) { const client = this.client; - const channel = client.store.get('channels', data.id); + const channel = client.channels.get(data.id); if (channel) { const oldChannel = cloneObject(channel); diff --git a/src/client/actions/GuildDelete.js b/src/client/actions/GuildDelete.js index 0e040dc4a..b37ab7738 100644 --- a/src/client/actions/GuildDelete.js +++ b/src/client/actions/GuildDelete.js @@ -11,7 +11,7 @@ class GuildDeleteAction extends Action { handle(data) { const client = this.client; - let guild = client.store.get('guilds', data.id); + let guild = client.guilds.get(data.id); if (guild) { if (guild.available && data.unavailable) { @@ -26,7 +26,7 @@ class GuildDeleteAction extends Action { }; } // delete guild - client.store.remove('guilds', guild); + client.guilds.delete(guild.id); this.deleted[guild.id] = guild; this.scheduleForDeletion(guild.id); } else if (this.deleted[data.id]) { diff --git a/src/client/actions/GuildMemberRemove.js b/src/client/actions/GuildMemberRemove.js index 29869caf8..2a20ddf65 100644 --- a/src/client/actions/GuildMemberRemove.js +++ b/src/client/actions/GuildMemberRemove.js @@ -11,7 +11,7 @@ class GuildMemberRemoveAction extends Action { handle(data) { const client = this.client; - const guild = client.store.get('guilds', data.guild_id); + const guild = client.guilds.get(data.guild_id); if (guild) { let member = guild.members.get(data.user.id); if (member) { diff --git a/src/client/actions/GuildRoleCreate.js b/src/client/actions/GuildRoleCreate.js index 8f21dbe6d..58cf4b401 100644 --- a/src/client/actions/GuildRoleCreate.js +++ b/src/client/actions/GuildRoleCreate.js @@ -6,7 +6,7 @@ class GuildRoleCreate extends Action { handle(data) { const client = this.client; - const guild = client.store.get('guilds', data.guild_id); + const guild = client.guilds.get(data.guild_id); if (guild) { const already = guild.roles.get(data.role.id); diff --git a/src/client/actions/GuildRoleDelete.js b/src/client/actions/GuildRoleDelete.js index c296589e4..9c22cff27 100644 --- a/src/client/actions/GuildRoleDelete.js +++ b/src/client/actions/GuildRoleDelete.js @@ -11,7 +11,7 @@ class GuildRoleDeleteAction extends Action { handle(data) { const client = this.client; - const guild = client.store.get('guilds', data.guild_id); + const guild = client.guilds.get(data.guild_id); if (guild) { let exists = guild.roles.get(data.role_id); diff --git a/src/client/actions/GuildRoleUpdate.js b/src/client/actions/GuildRoleUpdate.js index 2929ac1f3..992e76772 100644 --- a/src/client/actions/GuildRoleUpdate.js +++ b/src/client/actions/GuildRoleUpdate.js @@ -6,7 +6,7 @@ class GuildRoleUpdateAction extends Action { handle(data) { const client = this.client; - const guild = client.store.get('guilds', data.guild_id); + const guild = client.guilds.get(data.guild_id); const roleData = data.role; diff --git a/src/client/actions/GuildUpdate.js b/src/client/actions/GuildUpdate.js index a7a2775de..8d73c9329 100644 --- a/src/client/actions/GuildUpdate.js +++ b/src/client/actions/GuildUpdate.js @@ -12,7 +12,7 @@ class GuildUpdateAction extends Action { handle(data) { const client = this.client; - const guild = client.store.get('guilds', data.id); + const guild = client.guilds.get(data.id); if (guild) { const oldGuild = cloneObject(guild); diff --git a/src/client/actions/MessageCreate.js b/src/client/actions/MessageCreate.js index 75f5e25f0..bba4bf83d 100644 --- a/src/client/actions/MessageCreate.js +++ b/src/client/actions/MessageCreate.js @@ -5,7 +5,7 @@ class MessageCreateAction extends Action { handle(data) { const client = this.client; - const channel = client.store.get('channels', data.channel_id); + const channel = client.channels.get(data.channel_id); if (channel) { const message = channel._cacheMessage(new Message(channel, data, client)); diff --git a/src/client/actions/MessageDelete.js b/src/client/actions/MessageDelete.js index 448691672..501058478 100644 --- a/src/client/actions/MessageDelete.js +++ b/src/client/actions/MessageDelete.js @@ -10,7 +10,7 @@ class MessageDeleteAction extends Action { handle(data) { const client = this.client; - const channel = client.store.get('channels', data.channel_id); + const channel = client.channels.get(data.channel_id); if (channel) { let message = channel.messages.get(data.id); diff --git a/src/client/actions/MessageUpdate.js b/src/client/actions/MessageUpdate.js index 58fd95870..7985fae13 100644 --- a/src/client/actions/MessageUpdate.js +++ b/src/client/actions/MessageUpdate.js @@ -6,7 +6,7 @@ class MessageUpdateAction extends Action { handle(data) { const client = this.client; - const channel = client.store.get('channels', data.channel_id); + const channel = client.channels.get(data.channel_id); if (channel) { const message = channel.messages.get(data.id); diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index fa62fa85f..c1895effa 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -102,7 +102,7 @@ class RESTMethods { } getExistingDM(recipient) { - const dmChannel = this.rest.client.store.getAsArray('channels') + const dmChannel = Array.from(this.rest.client.channels.values()) .filter(channel => channel.recipient) .filter(channel => channel.recipient.id === recipient.id); diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 0892997b7..63672e3fd 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -167,11 +167,11 @@ class WebSocketManager { * the `READY` event. * @returns {null} */ - checkIfReady() { + checkIfReady(a) { if (this.status !== Constants.Status.READY) { let unavailableCount = 0; - for (const guildID in this.client.store.data.guilds) { - unavailableCount += this.client.store.data.guilds[guildID].available ? 0 : 1; + for (const guildID of this.client.guilds.keys()) { + unavailableCount += this.client.guilds.get(guildID).available ? 0 : 1; } if (unavailableCount === 0) { diff --git a/src/client/websocket/packets/handlers/GuildBanAdd.js b/src/client/websocket/packets/handlers/GuildBanAdd.js index 11b336961..f380480be 100644 --- a/src/client/websocket/packets/handlers/GuildBanAdd.js +++ b/src/client/websocket/packets/handlers/GuildBanAdd.js @@ -9,8 +9,8 @@ class GuildBanAddHandler extends AbstractHandler { const data = packet.d; const client = this.packetManager.client; - const guild = client.store.get('guilds', data.guild_id); - const user = client.store.get('users', data.user.id); + const guild = client.guilds.get(data.guild_id); + const user = client.users.get(data.user.id); if (guild && user) { client.emit(Constants.Events.GUILD_BAN_ADD, guild, user); diff --git a/src/client/websocket/packets/handlers/GuildBanRemove.js b/src/client/websocket/packets/handlers/GuildBanRemove.js index 1a41f777a..8cc5ce8de 100644 --- a/src/client/websocket/packets/handlers/GuildBanRemove.js +++ b/src/client/websocket/packets/handlers/GuildBanRemove.js @@ -10,8 +10,8 @@ class GuildBanRemoveHandler extends AbstractHandler { const data = packet.d; const client = this.packetManager.client; - const guild = client.store.get('guilds', data.guild_id); - const user = client.store.get('users', data.user.id); + const guild = client.guilds.get(data.guild_id); + const user = client.users.get(data.user.id); if (guild && user) { client.emit(Constants.Events.GUILD_BAN_REMOVE, guild, user); diff --git a/src/client/websocket/packets/handlers/GuildCreate.js b/src/client/websocket/packets/handlers/GuildCreate.js index f39b21302..4780c96bc 100644 --- a/src/client/websocket/packets/handlers/GuildCreate.js +++ b/src/client/websocket/packets/handlers/GuildCreate.js @@ -6,7 +6,7 @@ class GuildCreateHandler extends AbstractHandler { const data = packet.d; const client = this.packetManager.client; - const guild = client.store.get('guilds', data.id); + const guild = client.guilds.get(data.id); if (guild) { if (!guild.available && !data.unavailable) { diff --git a/src/client/websocket/packets/handlers/GuildMemberAdd.js b/src/client/websocket/packets/handlers/GuildMemberAdd.js index 8f9101fb8..ad6f4d49d 100644 --- a/src/client/websocket/packets/handlers/GuildMemberAdd.js +++ b/src/client/websocket/packets/handlers/GuildMemberAdd.js @@ -8,7 +8,7 @@ class GuildMemberAddHandler extends AbstractHandler { const data = packet.d; const client = this.packetManager.client; - const guild = client.store.get('guilds', data.guild_id); + const guild = client.guilds.get(data.guild_id); if (guild) { guild._addMember(data); diff --git a/src/client/websocket/packets/handlers/GuildMemberUpdate.js b/src/client/websocket/packets/handlers/GuildMemberUpdate.js index ebc17f75e..cca3422c0 100644 --- a/src/client/websocket/packets/handlers/GuildMemberUpdate.js +++ b/src/client/websocket/packets/handlers/GuildMemberUpdate.js @@ -8,7 +8,7 @@ class GuildMemberUpdateHandler extends AbstractHandler { const data = packet.d; const client = this.packetManager.client; - const guild = client.store.get('guilds', data.guild_id); + const guild = client.guilds.get(data.guild_id); if (guild) { const member = guild.members.get(data.user.id); diff --git a/src/client/websocket/packets/handlers/GuildMembersChunk.js b/src/client/websocket/packets/handlers/GuildMembersChunk.js index 5949580dd..3058c506d 100644 --- a/src/client/websocket/packets/handlers/GuildMembersChunk.js +++ b/src/client/websocket/packets/handlers/GuildMembersChunk.js @@ -8,7 +8,7 @@ class GuildMembersChunkHandler extends AbstractHandler { handle(packet) { const data = packet.d; const client = this.packetManager.client; - const guild = client.store.get('guilds', data.guild_id); + const guild = client.guilds.get(data.guild_id); const members = []; if (guild) { diff --git a/src/client/websocket/packets/handlers/PresenceUpdate.js b/src/client/websocket/packets/handlers/PresenceUpdate.js index 39de7bf91..cac2c9d50 100644 --- a/src/client/websocket/packets/handlers/PresenceUpdate.js +++ b/src/client/websocket/packets/handlers/PresenceUpdate.js @@ -7,8 +7,8 @@ class PresenceUpdateHandler extends AbstractHandler { handle(packet) { const data = packet.d; const client = this.packetManager.client; - let user = client.store.get('users', data.user.id); - const guild = client.store.get('guilds', data.guild_id); + let user = client.users.get(data.user.id); + const guild = client.guilds.get(data.guild_id); function makeUser(newUser) { return client.store.newUser(newUser); diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index 065a42d56..3bd6ca7d9 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -9,8 +9,9 @@ class ReadyHandler extends AbstractHandler { const data = packet.d; const client = this.packetManager.client; - client.store.user = client.store.add('users', new ClientUser(client, data.user)); - + const clientUser = new ClientUser(client, data.user); + client.store.user = clientUser; + client.users.set(clientUser.id, clientUser); for (const guild of data.guilds) { client.store.newGuild(guild); } @@ -21,7 +22,7 @@ class ReadyHandler extends AbstractHandler { this.packetManager.ws.sessionID = data.session_id; - this.packetManager.ws.checkIfReady(); + this.packetManager.ws.checkIfReady('abc'); } } diff --git a/src/client/websocket/packets/handlers/TypingStart.js b/src/client/websocket/packets/handlers/TypingStart.js index 421cba9b0..967cc9740 100644 --- a/src/client/websocket/packets/handlers/TypingStart.js +++ b/src/client/websocket/packets/handlers/TypingStart.js @@ -23,8 +23,8 @@ class TypingStartHandler extends AbstractHandler { handle(packet) { const data = packet.d; const client = this.packetManager.client; - const channel = client.store.get('channels', data.channel_id); - const user = client.store.get('users', data.user_id); + const channel = client.channels.get(data.channel_id); + const user = client.users.get(data.user_id); const timestamp = new Date(data.timestamp * 1000); function tooLate() { diff --git a/src/client/websocket/packets/handlers/VoiceStateUpdate.js b/src/client/websocket/packets/handlers/VoiceStateUpdate.js index 9145888c4..53035076e 100644 --- a/src/client/websocket/packets/handlers/VoiceStateUpdate.js +++ b/src/client/websocket/packets/handlers/VoiceStateUpdate.js @@ -8,7 +8,7 @@ class VoiceStateUpdateHandler extends AbstractHandler { handle(packet) { const data = packet.d; const client = this.packetManager.client; - const guild = client.store.get('guilds', data.guild_id); + const guild = client.guilds.get(data.guild_id); if (guild) { const member = guild.members.get(data.user_id); diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 5676b66ac..958ea21da 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -15,11 +15,12 @@ class DMChannel extends Channel { setup(data) { super.setup(data); + const recipient = new User(this.client, data.recipients[0]); /** * The recipient on the other end of the DM * @type {User} */ - this.recipient = this.client.store.add('users', new User(this.client, data.recipients[0])); + this.recipient = this.client.users.set(recipient.id, recipient); /** * The ID of the last sent message, if available * @type {?String} diff --git a/src/structures/Guild.js b/src/structures/Guild.js index d8b9f4854..123a39b64 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -283,7 +283,7 @@ class Guild { if (data.presences) { for (const presence of data.presences) { - const user = this.client.store.get('users', presence.user.id); + const user = this.client.users.get(presence.user.id); if (user) { user.status = presence.status; user.game = presence.game; diff --git a/src/structures/Message.js b/src/structures/Message.js index e0368a53e..3f1d94d7a 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -84,7 +84,7 @@ class Message { */ this.id = data.id; for (const mention of data.mentions) { - let user = this.client.store.get('users', mention.id); + let user = this.client.users.get(mention.id); if (user) { this.mentions.push(user); } else { @@ -96,7 +96,7 @@ class Message { patch(data) { if (data.author) { - this.author = this.client.store.get('users', data.author.id); + this.author = this.client.users.get(data.author.id); } if (data.content) { this.content = data.content; @@ -124,7 +124,7 @@ class Message { } if (data.mentions) { for (const mention of data.mentions) { - let user = this.client.store.get('users', mention.id); + let user = this.client.users.get(mention.id); if (user) { this.mentions.push(user); } else { diff --git a/src/structures/datastore/ClientDataStore.js b/src/structures/datastore/ClientDataStore.js index 7c277b8c7..cb0f365de 100644 --- a/src/structures/datastore/ClientDataStore.js +++ b/src/structures/datastore/ClientDataStore.js @@ -18,10 +18,6 @@ class ClientDataStore extends AbstractDataStore { this.user = null; this.email = null; this.password = null; - - this.register('users'); - this.register('guilds'); - this.register('channels'); } get pastReady() { @@ -29,8 +25,9 @@ class ClientDataStore extends AbstractDataStore { } newGuild(data) { - const already = this.get('guilds', data.id); - const guild = this.add('guilds', new Guild(this.client, data)); + const already = this.client.guilds.get(data.id); + const guild = new Guild(this.client, data); + this.client.guilds.set(guild.id, guild); if (this.pastReady && !already) { this.client.emit(Constants.Events.GUILD_CREATE, guild); } @@ -39,12 +36,14 @@ class ClientDataStore extends AbstractDataStore { } newUser(data) { - return this.add('users', new User(this.client, data)); + const user = new User(this.client, data); + this.client.users.set(user.id, user); + return user; } newChannel(data, $guild) { let guild = $guild; - const already = this.get('channels', data.id); + const already = this.client.channels.get(data.id); let channel; if (data.type === Constants.ChannelTypes.DM) { channel = new DMChannel(this.client, data); @@ -66,25 +65,25 @@ class ClientDataStore extends AbstractDataStore { this.client.emit(Constants.Events.CHANNEL_CREATE, channel); } - return this.add('channels', channel); + return this.client.channels.set(channel.id, channel); } return null; } killGuild(guild) { - const already = this.get('guilds', guild.id); - this.remove('guilds', guild); + const already = this.client.guilds.get(guild.id); + this.client.guilds.delete(guild.id); if (already && this.pastReady) { this.client.emit(Constants.Events.GUILD_DELETE, guild); } } killUser(user) { - this.remove('users', user); + this.users.delete(user.id); } killChannel(channel) { - this.remove('channels', channel); + this.client.channels.delete(channel.id); if (channel instanceof GuildChannel) { channel.guild.channels.delete(channel.id); } diff --git a/test/random.js b/test/random.js index 55a56ccc8..2d9f9e2dd 100644 --- a/test/random.js +++ b/test/random.js @@ -21,7 +21,7 @@ client.on('guildUpdate', (old, guild) => { console.log('guildupdate', old.name, guild.name); }); client.on('channelCreate', channel => { - // console.log(channel); + console.log(channel); }); client.on('channelDelete', channel => { console.log('channDel', channel.name); @@ -122,7 +122,10 @@ client.on('message', message => { if (message.content === 'stats') { let m = ''; m += `I am aware of ${message.guild.channels.size} channels\n`; - m += `I am aware of ${message.guild.members.size} members`; + m += `I am aware of ${message.guild.members.size} members\n`; + m += `I am aware of ${client.channels.size} channels overall\n`; + m += `I am aware of ${client.guilds.size} guilds overall\n`; + m += `I am aware of ${client.users.size} users overall\n`; message.channel.sendMessage(m); } From 8d5d90e222f616935f836920b5967e269a14eadd Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 22:34:59 +0100 Subject: [PATCH 112/324] Remove all data stores! Move to maps --- docs/docs.json | 2 +- src/client/Client.js | 36 +++++++++++------ .../ClientDataManager.js} | 28 +++++-------- src/client/ClientManager.js | 2 +- src/client/actions/ChannelCreate.js | 2 +- src/client/actions/ChannelDelete.js | 2 +- src/client/actions/UserUpdate.js | 16 ++++---- src/client/rest/APIRequest.js | 8 ++-- src/client/rest/RESTMethods.js | 16 ++++---- src/client/websocket/WebSocketManager.js | 12 ++++-- .../websocket/packets/handlers/GuildCreate.js | 2 +- .../packets/handlers/PresenceUpdate.js | 2 +- .../websocket/packets/handlers/Ready.js | 6 +-- src/structures/ClientUser.js | 8 ++-- src/structures/Guild.js | 4 +- src/structures/Message.js | 6 +-- src/structures/datastore/AbstractDataStore.js | 40 ------------------- 17 files changed, 81 insertions(+), 111 deletions(-) rename src/{structures/datastore/ClientDataStore.js => client/ClientDataManager.js} (77%) delete mode 100644 src/structures/datastore/AbstractDataStore.js diff --git a/docs/docs.json b/docs/docs.json index 6fe65c205..83fde4d4f 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":96,"filename":"Client.js","path":"src/client"},"order":10}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#store","longname":"Client#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Client","memberof":"Client","type":[[[["ClientDataStore"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":64,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":69,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":74,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":[[[["ClientUser"],""]]],"meta":{"lineno":109,"filename":"Client.js","path":"src/client"},"order":11}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":12},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":14},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":24}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":25},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":28},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":29}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":26},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":27}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":30},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":33}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":31},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":32}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":34},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":37},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":38},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":39},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":223},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":224},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":225},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":226},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":227}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":35},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":36},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":216},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":217},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":218},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":219},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":220},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":221},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":222}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":41},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":44},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":211},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":212},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":230}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":42},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":43},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":228},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":229}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":45},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":84}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":71}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":85},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":233}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":86},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":87},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":88},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":231},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":232}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":98},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":99},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":100},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":101},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":113}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":116},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":133}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":117},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":118},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":119},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":130}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":134},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":135},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":136},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":137}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":138},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":153},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":156}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":139},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":140},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":141},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":147}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":157},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":214},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":215},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":241},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":243},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":248}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":213},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":246},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":247}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":158},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":159},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":160},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":161},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":162},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":165}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":169},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":173},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":255},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":256},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":257},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":258},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":259},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":260},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":263}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":170},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":171},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":172},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":249},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":261},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":262}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":174},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":178,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":179,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":175},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":176},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":177}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":180},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":183},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":267,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":268,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":181},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":182},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":264},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":265},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":266}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":184},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":48,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":70,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":80,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":92,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":109,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":124,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":197},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":136,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":198},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":160,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":199},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":170,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":200},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":189,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":201}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":185},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":186},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":53,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":58,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":202},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":204},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":205}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":203}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":13},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":23}}}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":116,"filename":"Client.js","path":"src/client"},"order":14}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#dataManager","longname":"Client#dataManager","name":"dataManager","scope":"instance","kind":"member","description":"The data manager of the Client","memberof":"Client","type":[[[["ClientDataManager"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":64,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":69,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":74,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#token","longname":"Client#token","name":"token","scope":"instance","kind":"member","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":79,"filename":"Client.js","path":"src/client"},"order":10},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The ClientUser representing the logged in Client","memberof":"Client","type":[[[["ClientUser"],""]]],"nullable":true,"meta":{"lineno":84,"filename":"Client.js","path":"src/client"},"order":11},{"id":"Client#email","longname":"Client#email","name":"email","scope":"instance","kind":"member","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":89,"filename":"Client.js","path":"src/client"},"order":12},{"id":"Client#password","longname":"Client#password","name":"password","scope":"instance","kind":"member","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":94,"filename":"Client.js","path":"src/client"},"order":13}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":23},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":25},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":27}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":28},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":31},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":32}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":29},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":30}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":33},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":36}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":34},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":35}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":37},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":41},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":42},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":43},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":257},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":258},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":259},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":260},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":261}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":38},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":39},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":250},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":251},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":252},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":253},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":254},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":255},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":256}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":44},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":47},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":213},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":214},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":222}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":45},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":46},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":212},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":220},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":221}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":48},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":85},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":86},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":87}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":74}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":88},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":99},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":100},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":249}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":247},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":248}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":101},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":117},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":118},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":218},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":219}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":116}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":119},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":134},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":135},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":136}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":133}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":137},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":138},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":139},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":140}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":141},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":153},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":157},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":158},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":159}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":150}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":160},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":216},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":217},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":229},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":234}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":215},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":223},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":224},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":225},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":226},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":227},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":228}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":161},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":169},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":170},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":171},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":211}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":162},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":168}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":172},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":176},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":241},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":243},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":246}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":173},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":174},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":175},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":240}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":177},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":181,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":182,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":178},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":180}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":183},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":186},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":265,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":266,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":184},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":185},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":262},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":263},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":264}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":54,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":76,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":197},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":198},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":98,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":199},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":115,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":200},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":201},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":142,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":202},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":166,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":203},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":176,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":204},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":195,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":205}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#gateway","longname":"WebSocketManager#gateway","name":"gateway","scope":"instance","kind":"member","description":"The gateway address for this WebSocket connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":46,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":59,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":24},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":26}}}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 66c35f4fc..dea3dfb0c 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -2,7 +2,7 @@ const EventEmitter = require('events').EventEmitter; const mergeDefault = require('../util/MergeDefault'); const Constants = require('../util/Constants'); const RESTManager = require('./rest/RESTManager'); -const ClientDataStore = require('../structures/datastore/ClientDataStore'); +const ClientDataManager = require('./ClientDataManager'); const ClientManager = require('./ClientManager'); const ClientDataResolver = require('./ClientDataResolver'); const WebSocketManager = require('./websocket/WebSocketManager'); @@ -27,11 +27,11 @@ class Client extends EventEmitter { */ this.rest = new RESTManager(this); /** - * The data store of the Client - * @type {ClientDataStore} + * The data manager of the Client + * @type {ClientDataManager} * @private */ - this.store = new ClientDataStore(this); + this.dataManager = new ClientDataManager(this); /** * The manager of the Client * @type {ClientManager} @@ -72,6 +72,26 @@ class Client extends EventEmitter { * @type {Map} */ this.channels = new Map(); + /** + * The authorization token for the logged in user/bot. + * @type {?String} + */ + this.token = null; + /** + * The ClientUser representing the logged in Client + * @type {?ClientUser} + */ + this.user = null; + /** + * The email, if there is one, for the logged in Client + * @type {?String} + */ + this.email = null; + /** + * The password, if there is one, for the logged in Client + * @type {?String} + */ + this.password = null; } /** @@ -102,14 +122,6 @@ class Client extends EventEmitter { return this.rest.methods.loginToken(email); } - /** - * The User of the logged in Client, only available after `READY` has been fired. - * @type {ClientUser} - */ - get user() { - return this.store.user; - } - } module.exports = Client; diff --git a/src/structures/datastore/ClientDataStore.js b/src/client/ClientDataManager.js similarity index 77% rename from src/structures/datastore/ClientDataStore.js rename to src/client/ClientDataManager.js index cb0f365de..35516b9db 100644 --- a/src/structures/datastore/ClientDataStore.js +++ b/src/client/ClientDataManager.js @@ -1,23 +1,15 @@ -const AbstractDataStore = require('./AbstractDataStore'); -const Constants = require('../../util/Constants'); -const cloneObject = require('../../util/CloneObject'); -const Guild = require('../Guild'); -const User = require('../User'); -const DMChannel = require('../DMChannel'); -const TextChannel = require('../TextChannel'); -const VoiceChannel = require('../VoiceChannel'); -const GuildChannel = require('../GuildChannel'); +const Constants = require('../util/Constants'); +const cloneObject = require('../util/CloneObject'); +const Guild = require('../structures/Guild'); +const User = require('../structures/User'); +const DMChannel = require('../structures/DMChannel'); +const TextChannel = require('../structures/TextChannel'); +const VoiceChannel = require('../structures/VoiceChannel'); +const GuildChannel = require('../structures/GuildChannel'); -class ClientDataStore extends AbstractDataStore { +class ClientDataManager { constructor(client) { - super(); - this.client = client; - this.token = null; - this.session = null; - this.user = null; - this.email = null; - this.password = null; } get pastReady() { @@ -102,4 +94,4 @@ class ClientDataStore extends AbstractDataStore { } } -module.exports = ClientDataStore; +module.exports = ClientDataManager; diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index 6fa7dc4d0..ada92a8fa 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -27,7 +27,7 @@ class ClientManager { * @returns {null} */ connectToWebSocket(token, resolve, reject) { - this.client.store.token = token; + this.client.token = token; this.client.rest.methods.getGateway() .then(gateway => { this.client.ws.connect(gateway); diff --git a/src/client/actions/ChannelCreate.js b/src/client/actions/ChannelCreate.js index 09cbec54f..bfbb6aab1 100644 --- a/src/client/actions/ChannelCreate.js +++ b/src/client/actions/ChannelCreate.js @@ -4,7 +4,7 @@ class ChannelCreateAction extends Action { handle(data) { const client = this.client; - const channel = client.store.newChannel(data); + const channel = client.dataManager.newChannel(data); return { channel, diff --git a/src/client/actions/ChannelDelete.js b/src/client/actions/ChannelDelete.js index 58b7bff5a..e740a11a0 100644 --- a/src/client/actions/ChannelDelete.js +++ b/src/client/actions/ChannelDelete.js @@ -13,7 +13,7 @@ class ChannelDeleteAction extends Action { let channel = client.channels.get(data.id); if (channel) { - client.store.killChannel(channel); + client.dataManager.killChannel(channel); this.deleted[channel.id] = channel; this.scheduleForDeletion(channel.id); } else if (this.deleted[data.id]) { diff --git a/src/client/actions/UserUpdate.js b/src/client/actions/UserUpdate.js index 7c10a9297..1e15837f2 100644 --- a/src/client/actions/UserUpdate.js +++ b/src/client/actions/UserUpdate.js @@ -7,22 +7,22 @@ class UserUpdateAction extends Action { handle(data) { const client = this.client; - if (client.store.user) { - if (client.store.user.equals(data)) { + if (client.user) { + if (client.user.equals(data)) { return { - old: client.store.user, - updated: client.store.user, + old: client.user, + updated: client.user, }; } - const oldUser = cloneObject(client.store.user); - client.store.user.setup(data); + const oldUser = cloneObject(client.user); + client.user.setup(data); - client.emit(Constants.Events.USER_UPDATE, oldUser, client.store.user); + client.emit(Constants.Events.USER_UPDATE, oldUser, client.user); return { old: oldUser, - updated: client.store.user, + updated: client.user, }; } diff --git a/src/client/rest/APIRequest.js b/src/client/rest/APIRequest.js index 7fa49f604..e27e5833c 100644 --- a/src/client/rest/APIRequest.js +++ b/src/client/rest/APIRequest.js @@ -16,10 +16,10 @@ class APIRequest { } getAuth() { - if (this.rest.client.store.token && this.rest.client.store.user && this.rest.client.store.user.bot) { - return `Bot ${this.rest.client.store.token}`; - } else if (this.rest.client.store.token) { - return this.rest.client.store.token; + if (this.rest.client.token && this.rest.client.user && this.rest.client.user.bot) { + return `Bot ${this.rest.client.token}`; + } else if (this.rest.client.token) { + return this.rest.client.token; } throw Constants.Errors.NO_TOKEN; } diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index c1895effa..0f2038e54 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -11,8 +11,8 @@ class RESTMethods { loginEmailPassword(email, password) { return new Promise((resolve, reject) => { - this.rest.client.store.email = email; - this.rest.client.store.password = password; + this.rest.client.email = email; + 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); @@ -31,8 +31,8 @@ class RESTMethods { return new Promise((resolve, reject) => { this.rest.makeRequest('get', Constants.Endpoints.gateway, true) .then(res => { - this.rest.client.store.gateway = `${res.url}/?encoding=json&v=${this.rest.client.options.protocol_version}`; - resolve(this.rest.client.store.gateway); + this.rest.client.ws.gateway = `${res.url}/?encoding=json&v=${this.rest.client.options.protocol_version}`; + resolve(this.rest.client.ws.gateway); }) .catch(reject); }); @@ -117,7 +117,7 @@ class RESTMethods { return resolve(dmChannel); } - return this.rest.makeRequest('post', Constants.Endpoints.userChannels(this.rest.client.store.user.id), true, { + return this.rest.makeRequest('post', Constants.Endpoints.userChannels(this.rest.client.user.id), true, { recipient_id: recipient.id, }) .then(data => resolve(this.rest.client.actions.ChannelCreate.handle(data).channel)) @@ -181,14 +181,14 @@ class RESTMethods { updateCurrentUser(_data) { return new Promise((resolve, reject) => { - const user = this.rest.client.store.user; + const user = this.rest.client.user; const data = {}; data.username = _data.username || user.username; data.avatar = this.rest.client.resolver.resolveBase64(_data.avatar) || user.avatar; if (!user.bot) { - data.password = this.rest.client.store.password; - data.email = _data.email || this.rest.client.store.email; + data.password = this.rest.client.password; + data.email = _data.email || this.rest.client.email; data.new_password = _data.newPassword; } diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 63672e3fd..59d14e62e 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -38,6 +38,12 @@ class WebSocketManager { * @type {?Number} */ this.sequence = -1; + + /** + * The gateway address for this WebSocket connection, null if not yet available. + * @type {?String} + */ + this.gateway = null; } /** @@ -91,7 +97,7 @@ class WebSocketManager { */ _sendResume() { const payload = { - token: this.client.store.token, + token: this.client.token, session_id: this.sessionID, seq: this.sequence, }; @@ -109,7 +115,7 @@ class WebSocketManager { _sendNewIdentify() { this.reconnecting = false; const payload = this.client.options.ws; - payload.token = this.client.store.token; + payload.token = this.client.token; this.send({ op: Constants.OPCodes.IDENTIFY, @@ -191,7 +197,7 @@ class WebSocketManager { this.ws.close(); this.packetManager.handleQueue(); this.client.emit(Constants.Events.RECONNECTING); - this.connect(this.client.store.gateway); + this.connect(this.client.ws.gateway); } } diff --git a/src/client/websocket/packets/handlers/GuildCreate.js b/src/client/websocket/packets/handlers/GuildCreate.js index 4780c96bc..d3bac1c7e 100644 --- a/src/client/websocket/packets/handlers/GuildCreate.js +++ b/src/client/websocket/packets/handlers/GuildCreate.js @@ -16,7 +16,7 @@ class GuildCreateHandler extends AbstractHandler { } } else { // a new guild - client.store.newGuild(data); + client.dataManager.newGuild(data); } } diff --git a/src/client/websocket/packets/handlers/PresenceUpdate.js b/src/client/websocket/packets/handlers/PresenceUpdate.js index cac2c9d50..cdfa45415 100644 --- a/src/client/websocket/packets/handlers/PresenceUpdate.js +++ b/src/client/websocket/packets/handlers/PresenceUpdate.js @@ -11,7 +11,7 @@ class PresenceUpdateHandler extends AbstractHandler { const guild = client.guilds.get(data.guild_id); function makeUser(newUser) { - return client.store.newUser(newUser); + return client.dataManager.newUser(newUser); } // step 1 diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index 3bd6ca7d9..475d9b6eb 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -10,14 +10,14 @@ class ReadyHandler extends AbstractHandler { const client = this.packetManager.client; const clientUser = new ClientUser(client, data.user); - client.store.user = clientUser; + client.user = clientUser; client.users.set(clientUser.id, clientUser); for (const guild of data.guilds) { - client.store.newGuild(guild); + client.dataManager.newGuild(guild); } for (const privateDM of data.private_channels) { - client.store.newChannel(privateDM); + client.dataManager.newChannel(privateDM); } this.packetManager.ws.sessionID = data.session_id; diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 27915c4a1..089521aa8 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -27,7 +27,7 @@ class ClientUser extends User { * @returns {Promise} * @example * // set username - * client.store.user.setUsername('discordjs') + * client.user.setUsername('discordjs') * .then(user => console.log(`My new username is ${user.username}`)) * .catch(console.log); */ @@ -42,7 +42,7 @@ class ClientUser extends User { * @returns {Promise} * @example * // set email - * client.store.user.setEmail('bob@gmail.com') + * client.user.setEmail('bob@gmail.com') * .then(user => console.log(`My new email is ${user.email}`)) * .catch(console.log); */ @@ -57,7 +57,7 @@ class ClientUser extends User { * @returns {Promise} * @example * // set password - * client.store.user.setPassword('password') + * client.user.setPassword('password') * .then(user => console.log('New password set!')) * .catch(console.log); */ @@ -70,7 +70,7 @@ class ClientUser extends User { * @returns {Promise} * @example * // set avatar - * client.store.user.setAvatar(fs.readFileSync('./avatar.png')) + * client.user.setAvatar(fs.readFileSync('./avatar.png')) * .then(user => console.log(`New avatar set!`)) * .catch(console.log); */ diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 123a39b64..727a5281f 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -70,7 +70,7 @@ class Guild { _addMember(guildUser, noEvent) { if (!(guildUser.user instanceof User)) { - guildUser.user = this.client.store.newUser(guildUser.user); + guildUser.user = this.client.dataManager.newUser(guildUser.user); } guildUser.joined_at = guildUser.joined_at || 0; @@ -263,7 +263,7 @@ class Guild { if (data.channels) { this.channels.clear(); for (const channel of data.channels) { - this.client.store.newChannel(channel, this); + this.client.dataManager.newChannel(channel, this); } } diff --git a/src/structures/Message.js b/src/structures/Message.js index 3f1d94d7a..5baa588c5 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -32,7 +32,7 @@ class Message { * The author of the message * @type {User} */ - this.author = this.client.store.newUser(data.author); + this.author = this.client.dataManager.newUser(data.author); /** * The content of the message * @type {String} @@ -88,7 +88,7 @@ class Message { if (user) { this.mentions.push(user); } else { - user = this.client.store.newUser(mention); + user = this.client.dataManager.newUser(mention); this.mentions.push(user); } } @@ -128,7 +128,7 @@ class Message { if (user) { this.mentions.push(user); } else { - user = this.client.store.newUser(mention); + user = this.client.dataManager.newUser(mention); this.mentions.push(user); } } diff --git a/src/structures/datastore/AbstractDataStore.js b/src/structures/datastore/AbstractDataStore.js deleted file mode 100644 index 5ec83ecad..000000000 --- a/src/structures/datastore/AbstractDataStore.js +++ /dev/null @@ -1,40 +0,0 @@ -class AbstractDataStore { - constructor() { - this.data = {}; - } - - register(name) { - this.data[name] = {}; - } - - add(location, object) { - if (this.data[location][object.id]) { - return this.data[location][object.id]; - } - this.data[location][object.id] = object; - return object; - } - - clear(location) { - this.data[location] = {}; - } - - remove(location, object) { - const id = (typeof object === 'string' || object instanceof String) ? object : object.id; - if (this.data[location][id]) { - delete this.data[location][id]; - return true; - } - return false; - } - - get(location, value) { - return this.data[location][value]; - } - - getAsArray(location) { - return Object.values(this.data[location]); - } -} - -module.exports = AbstractDataStore; From d2cba74c13973da313733c18b1921525fd65e4bc Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 22:35:42 +0100 Subject: [PATCH 113/324] Remove unused variable to pass ESLint test --- src/client/websocket/WebSocketManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 59d14e62e..8d87ad6ee 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -173,7 +173,7 @@ class WebSocketManager { * the `READY` event. * @returns {null} */ - checkIfReady(a) { + checkIfReady() { if (this.status !== Constants.Status.READY) { let unavailableCount = 0; for (const guildID of this.client.guilds.keys()) { From 3051ae70618cc2e38a8ab7961434b92507fad3ab Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 22:59:32 +0100 Subject: [PATCH 114/324] Add constructor documentation --- .eslintrc.js | 1 + docs/docs.json | 2 +- docs/gen/index.js | 23 ++++++++++++++++++++--- src/client/Client.js | 4 ++++ 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index d4ac453f8..8cb2d59b1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -14,5 +14,6 @@ module.exports = { "no-param-reassign": 0, "consistent-return": 0, "import/no-extraneous-dependencies": 0, + "no-continue": 0, } }; \ No newline at end of file diff --git a/docs/docs.json b/docs/docs.json index 83fde4d4f..cf438c16b 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":116,"filename":"Client.js","path":"src/client"},"order":14}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":28,"filename":"Client.js","path":"src/client"},"order":1},{"id":"Client#dataManager","longname":"Client#dataManager","name":"dataManager","scope":"instance","kind":"member","description":"The data manager of the Client","memberof":"Client","type":[[[["ClientDataManager"],""]]],"access":"private","meta":{"lineno":34,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":40,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":46,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":52,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":58,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":64,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":69,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":74,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#token","longname":"Client#token","name":"token","scope":"instance","kind":"member","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":79,"filename":"Client.js","path":"src/client"},"order":10},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The ClientUser representing the logged in Client","memberof":"Client","type":[[[["ClientUser"],""]]],"nullable":true,"meta":{"lineno":84,"filename":"Client.js","path":"src/client"},"order":11},{"id":"Client#email","longname":"Client#email","name":"email","scope":"instance","kind":"member","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":89,"filename":"Client.js","path":"src/client"},"order":12},{"id":"Client#password","longname":"Client#password","name":"password","scope":"instance","kind":"member","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":94,"filename":"Client.js","path":"src/client"},"order":13}],"events":[]},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":15},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":23},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":25},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":27}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":28},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":31},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":32}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":29},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":30}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":33},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":36}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":34},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":35}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":37},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":41},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":42},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":43},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":257},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":258},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":259},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":260},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":261}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":38},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":39},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":250},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":251},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":252},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":253},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":254},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":255},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":256}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":44},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":47},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":213},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":214},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":222}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":45},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":46},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":212},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":220},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":221}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":48},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":85},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":86},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":87}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":74}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":88},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":99},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":100},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":249}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":89},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":247},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":248}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":101},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":117},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":118},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":218},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":219}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":102},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":116}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":119},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":134},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":135},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":136}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":120},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":133}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":137},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":138},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":139},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":140}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":141},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":153},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":157},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":158},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":159}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":142},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":150}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":160},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":216},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":217},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":229},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":234}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":215},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":223},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":224},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":225},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":226},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":227},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":228}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":161},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":169},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":170},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":171},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":211}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":162},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":168}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":172},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":176},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":241},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":243},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":246}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":173},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":174},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":175},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":235},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":240}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":177},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":181,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":182,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":178},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":180}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":183},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":186},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":265,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":266,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":184},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":185},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":262},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":263},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":264}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":187},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":54,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":76,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":197},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":198},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":98,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":199},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":115,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":200},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":201},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":142,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":202},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":166,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":203},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":176,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":204},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":195,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":205}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#gateway","longname":"WebSocketManager#gateway","name":"gateway","scope":"instance","kind":"member","description":"The gateway address for this WebSocket connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":46,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":59,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":206},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":24},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":26}}}} \ No newline at end of file +{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":120,"filename":"Client.js","path":"src/client"},"order":15}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":32,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#dataManager","longname":"Client#dataManager","name":"dataManager","scope":"instance","kind":"member","description":"The data manager of the Client","memberof":"Client","type":[[[["ClientDataManager"],""]]],"access":"private","meta":{"lineno":38,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":44,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":56,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":62,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":68,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":73,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":78,"filename":"Client.js","path":"src/client"},"order":10},{"id":"Client#token","longname":"Client#token","name":"token","scope":"instance","kind":"member","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":83,"filename":"Client.js","path":"src/client"},"order":11},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The ClientUser representing the logged in Client","memberof":"Client","type":[[[["ClientUser"],""]]],"nullable":true,"meta":{"lineno":88,"filename":"Client.js","path":"src/client"},"order":12},{"id":"Client#email","longname":"Client#email","name":"email","scope":"instance","kind":"member","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":13},{"id":"Client#password","longname":"Client#password","name":"password","scope":"instance","kind":"member","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":98,"filename":"Client.js","path":"src/client"},"order":14}],"events":[],"constructor":{"id":"Client()","longname":"Client","name":"Client","kind":"constructor","description":"Creates an instance of Client.","memberof":"Client","params":[{"type":{"names":["Object"]},"optional":true,"description":"options to pass to the client","name":"options"}],"order":1}},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":24},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":26},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":28}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":29},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":32},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":33}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":30},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":31}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":34},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":37}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":35},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":36}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":38},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":41},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":42},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":43},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":44},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":258},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":259},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":260},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":261},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":262}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":39},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":251},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":252},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":253},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":254},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":255},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":256},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":257}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":45},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":48},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":214},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":215},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":223}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":46},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":47},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":213},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":221},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":222}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":49},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":85},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":86},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":87},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":88}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":75}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":89},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":99},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":100},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":101},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":250}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":248},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":249}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":102},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":118},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":119},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":219},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":220}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":117}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":120},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":135},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":136},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":137}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":134}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":138},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":139},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":140},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":141}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":142},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":153},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":157},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":158},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":159},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":160}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":151}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":161},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":217},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":218},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":235}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":216},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":224},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":225},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":226},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":227},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":228},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":229}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":162},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":170},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":171},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":172},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":211},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":212}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":169}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":173},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":177},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":243},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":247}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":174},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":175},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":176},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":241}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":178},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":182,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":183,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":180},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":181}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":184},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":187},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":266,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":267,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":185},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":186},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":263},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":264},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":265}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":54,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":76,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":198},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":199},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":98,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":200},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":115,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":201},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":202},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":142,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":203},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":166,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":204},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":176,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":205},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":195,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":206}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#gateway","longname":"WebSocketManager#gateway","name":"gateway","scope":"instance","kind":"member","description":"The gateway address for this WebSocket connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":46,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":59,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":197}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":23},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":25},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":27}}}} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js index d031b9fc3..500c72bed 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -51,14 +51,16 @@ function cleanPaths() { } } -function clean() { +function firstPass() { const cleaned = { classes: {}, interfaces: {}, typedefs: {}, }; - for (const item of json) { + for (const itemID in json) { + const item = json[itemID]; if (item.kind === 'class') { + delete json[itemID]; cleaned.classes[item.longname] = { meta: item, functions: [], @@ -66,13 +68,25 @@ function clean() { events: [], }; } else if (item.kind === 'interface') { + delete json[itemID]; cleaned.interfaces[item.longname] = { meta: item, functions: [], properties: [], events: [], }; - } else if (item.kind === 'member') { + } + } + return cleaned; +} + +function clean() { + const cleaned = firstPass(); + for (const item of json) { + if (!item) { + continue; + } + if (item.kind === 'member') { const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; const newTypes = []; for (const name of item.type.names) { @@ -97,6 +111,9 @@ function clean() { obj.functions.push(item); } else if (item.kind === 'typedef') { cleaned.typedefs[item.longname] = item; + } else if (item.kind === 'constructor') { + const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; + obj.constructor = item; } } json = cleaned; diff --git a/src/client/Client.js b/src/client/Client.js index dea3dfb0c..547163e7f 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -17,6 +17,10 @@ const ActionsManager = require('./actions/ActionsManager'); */ class Client extends EventEmitter { + /** + * Creates an instance of Client. + * @param {Object} [options] options to pass to the client + */ constructor(options) { super(); this.options = mergeDefault(Constants.DefaultOptions, options); From f8b2629b18dcc1234751a78466b8df6bb332457a Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 19 Aug 2016 23:00:07 +0100 Subject: [PATCH 115/324] Update doc gen version --- docs/docs.json | 2 +- docs/gen/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index cf438c16b..739025988 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":6},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":120,"filename":"Client.js","path":"src/client"},"order":15}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":32,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#dataManager","longname":"Client#dataManager","name":"dataManager","scope":"instance","kind":"member","description":"The data manager of the Client","memberof":"Client","type":[[[["ClientDataManager"],""]]],"access":"private","meta":{"lineno":38,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":44,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":56,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":62,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":68,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":73,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":78,"filename":"Client.js","path":"src/client"},"order":10},{"id":"Client#token","longname":"Client#token","name":"token","scope":"instance","kind":"member","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":83,"filename":"Client.js","path":"src/client"},"order":11},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The ClientUser representing the logged in Client","memberof":"Client","type":[[[["ClientUser"],""]]],"nullable":true,"meta":{"lineno":88,"filename":"Client.js","path":"src/client"},"order":12},{"id":"Client#email","longname":"Client#email","name":"email","scope":"instance","kind":"member","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":13},{"id":"Client#password","longname":"Client#password","name":"password","scope":"instance","kind":"member","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":98,"filename":"Client.js","path":"src/client"},"order":14}],"events":[],"constructor":{"id":"Client()","longname":"Client","name":"Client","kind":"constructor","description":"Creates an instance of Client.","memberof":"Client","params":[{"type":{"names":["Object"]},"optional":true,"description":"options to pass to the client","name":"options"}],"order":1}},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":24},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":26},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":28}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":29},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":32},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":33}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":30},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":31}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":34},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":37}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":35},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":36}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":38},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":41},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":42},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":43},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":44},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":258},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":259},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":260},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":261},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":262}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":39},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":251},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":252},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":253},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":254},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":255},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":256},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":257}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":45},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":48},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":214},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":215},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":223}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":46},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":47},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":213},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":221},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":222}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":49},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":85},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":86},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":87},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":88}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":75}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":89},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":99},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":100},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":101},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":250}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":248},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":249}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":102},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":118},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":119},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":219},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":220}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":117}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":120},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":135},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":136},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":137}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":134}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":138},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":139},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":140},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":141}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":142},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":153},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":157},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":158},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":159},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":160}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":151}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":161},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":217},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":218},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":235}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":216},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":224},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":225},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":226},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":227},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":228},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":229}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":162},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":170},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":171},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":172},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":211},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":212}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":169}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":173},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":177},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":243},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":247}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":174},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":175},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":176},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":241}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":178},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":182,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":183,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":180},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":181}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":184},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":187},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":266,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":267,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":185},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":186},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":263},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":264},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":265}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":54,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":76,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":198},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":199},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":98,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":200},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":115,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":201},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":202},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":142,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":203},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":166,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":204},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":176,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":205},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":195,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":206}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#gateway","longname":"WebSocketManager#gateway","name":"gateway","scope":"instance","kind":"member","description":"The gateway address for this WebSocket connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":46,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":59,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":197}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":23},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":25},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":27}}}} \ No newline at end of file +{"meta":{"version":7},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":120,"filename":"Client.js","path":"src/client"},"order":15}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":32,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#dataManager","longname":"Client#dataManager","name":"dataManager","scope":"instance","kind":"member","description":"The data manager of the Client","memberof":"Client","type":[[[["ClientDataManager"],""]]],"access":"private","meta":{"lineno":38,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":44,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":56,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":62,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":68,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":73,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":78,"filename":"Client.js","path":"src/client"},"order":10},{"id":"Client#token","longname":"Client#token","name":"token","scope":"instance","kind":"member","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":83,"filename":"Client.js","path":"src/client"},"order":11},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The ClientUser representing the logged in Client","memberof":"Client","type":[[[["ClientUser"],""]]],"nullable":true,"meta":{"lineno":88,"filename":"Client.js","path":"src/client"},"order":12},{"id":"Client#email","longname":"Client#email","name":"email","scope":"instance","kind":"member","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":13},{"id":"Client#password","longname":"Client#password","name":"password","scope":"instance","kind":"member","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":98,"filename":"Client.js","path":"src/client"},"order":14}],"events":[],"constructor":{"id":"Client()","longname":"Client","name":"Client","kind":"constructor","description":"Creates an instance of Client.","memberof":"Client","params":[{"type":{"names":["Object"]},"optional":true,"description":"options to pass to the client","name":"options"}],"order":1}},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":24},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":26},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":28}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":29},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":32},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":33}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":30},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":31}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":34},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":37}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":35},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":36}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":38},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":41},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":42},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":43},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":44},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":258},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":259},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":260},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":261},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":262}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":39},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":251},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":252},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":253},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":254},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":255},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":256},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":257}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":45},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":48},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":214},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":215},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":223}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":46},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":47},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":213},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":221},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":222}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":49},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":85},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":86},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":87},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":88}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":75}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":89},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":99},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":100},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":101},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":250}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":248},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":249}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":102},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":118},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":119},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":219},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":220}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":117}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":120},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":135},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":136},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":137}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":134}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":138},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":139},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":140},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":141}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":142},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":153},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":157},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":158},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":159},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":160}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":151}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":161},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":217},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":218},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":235}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":216},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":224},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":225},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":226},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":227},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":228},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":229}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":162},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":170},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":171},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":172},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":211},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":212}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":169}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":173},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":177},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":243},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":247}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":174},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":175},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":176},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":241}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":178},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":182,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":183,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":180},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":181}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":184},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":187},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":266,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":267,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":185},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":186},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":263},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":264},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":265}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":54,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":76,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":198},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":199},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":98,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":200},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":115,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":201},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":202},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":142,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":203},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":166,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":204},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":176,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":205},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":195,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":206}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#gateway","longname":"WebSocketManager#gateway","name":"gateway","scope":"instance","kind":"member","description":"The gateway address for this WebSocket connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":46,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":59,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":197}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":23},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":25},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":27}}}} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js index 500c72bed..70c2d2cea 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -4,7 +4,7 @@ let parse; const customDocs = require('../custom/index'); -const GEN_VERSION = 6; +const GEN_VERSION = 7; try { fs = require('fs-extra'); From 65350348a8d68dbe0a8f9edc5330f8d3459158a2 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 20 Aug 2016 00:15:04 +0100 Subject: [PATCH 116/324] Document all the events --- docs/docs.json | 2 +- docs/gen/index.js | 8 ++++++++ src/client/ClientDataManager.js | 6 ++++++ src/client/actions/ChannelUpdate.js | 8 ++++++++ src/client/actions/GuildDelete.js | 7 +++++++ src/client/actions/GuildMemberRemove.js | 10 ++++++++++ src/client/actions/GuildRoleCreate.js | 10 ++++++++++ src/client/actions/GuildRoleDelete.js | 8 ++++++++ src/client/actions/GuildRoleUpdate.js | 9 +++++++++ src/client/actions/GuildUpdate.js | 8 ++++++++ src/client/actions/MessageUpdate.js | 8 ++++++++ src/client/actions/UserUpdate.js | 8 ++++++++ src/client/websocket/WebSocketManager.js | 10 ++++++++++ .../websocket/packets/handlers/ChannelCreate.js | 7 +++++++ .../websocket/packets/handlers/ChannelDelete.js | 7 +++++++ .../websocket/packets/handlers/GuildBanAdd.js | 8 ++++++++ .../packets/handlers/GuildBanRemove.js | 8 ++++++++ .../websocket/packets/handlers/GuildDelete.js | 7 +++++++ .../packets/handlers/GuildMembersChunk.js | 8 ++++++++ .../websocket/packets/handlers/MessageCreate.js | 7 +++++++ .../websocket/packets/handlers/MessageDelete.js | 7 +++++++ .../packets/handlers/PresenceUpdate.js | 17 +++++++++++++++++ .../websocket/packets/handlers/TypingStart.js | 16 ++++++++++++++++ .../packets/handlers/VoiceStateUpdate.js | 8 ++++++++ src/structures/Guild.js | 8 ++++++++ src/util/Constants.js | 1 + 26 files changed, 210 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 739025988..3533e35d2 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":7},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":120,"filename":"Client.js","path":"src/client"},"order":15}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":32,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#dataManager","longname":"Client#dataManager","name":"dataManager","scope":"instance","kind":"member","description":"The data manager of the Client","memberof":"Client","type":[[[["ClientDataManager"],""]]],"access":"private","meta":{"lineno":38,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":44,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":56,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":62,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":68,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":73,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":78,"filename":"Client.js","path":"src/client"},"order":10},{"id":"Client#token","longname":"Client#token","name":"token","scope":"instance","kind":"member","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":83,"filename":"Client.js","path":"src/client"},"order":11},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The ClientUser representing the logged in Client","memberof":"Client","type":[[[["ClientUser"],""]]],"nullable":true,"meta":{"lineno":88,"filename":"Client.js","path":"src/client"},"order":12},{"id":"Client#email","longname":"Client#email","name":"email","scope":"instance","kind":"member","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":13},{"id":"Client#password","longname":"Client#password","name":"password","scope":"instance","kind":"member","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":98,"filename":"Client.js","path":"src/client"},"order":14}],"events":[],"constructor":{"id":"Client()","longname":"Client","name":"Client","kind":"constructor","description":"Creates an instance of Client.","memberof":"Client","params":[{"type":{"names":["Object"]},"optional":true,"description":"options to pass to the client","name":"options"}],"order":1}},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":16},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":24},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":26},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":28}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":29},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":32},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":33}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":30},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":31}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":34},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":37}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":35},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":36}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":38},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":41},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":42},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":43},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":44},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":258},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":259},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":260},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":261},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":262}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":39},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":251},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":252},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":253},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":254},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":255},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":256},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":257}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":45},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":48},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":214},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":215},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":223}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":46},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":47},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":213},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":221},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":222}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":49},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":109,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":135,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":146,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":180,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":320,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":333,"filename":"Guild.js","path":"src/structures"},"order":77},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":346,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":359,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":376,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":390,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":404,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":418,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":432,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":446,"filename":"Guild.js","path":"src/structures"},"order":85},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":460,"filename":"Guild.js","path":"src/structures"},"order":86},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":474,"filename":"Guild.js","path":"src/structures"},"order":87},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":488,"filename":"Guild.js","path":"src/structures"},"order":88}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":50},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":187,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":192,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":197,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":202,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":207,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":212,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":217,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":222,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":227,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":232,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":237,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":242,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":247,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":261,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":274,"filename":"Guild.js","path":"src/structures"},"order":75}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":89},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":99},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":100},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":101},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":250}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":90},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":91},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":248},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":249}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":102},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":118},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":119},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":219},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":220}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":103},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":104},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":117}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":120},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":135},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":136},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":137}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":121},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":122},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":134}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":138},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":139},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":140},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":141}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":142},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":153},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":157},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":158},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":159},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":160}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":143},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":144},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":151}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":161},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":217},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":218},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":230},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":231},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":232},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":233},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":234},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":235}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":216},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":224},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":225},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":226},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":227},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":228},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":229}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":162},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":170},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":171},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":172},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":211},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":212}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":163},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":164},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":169}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":173},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":177},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":242},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":243},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":244},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":245},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":246},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":247}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":174},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":175},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":176},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":236},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":237},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":238},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":239},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":240},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":241}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":178},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":182,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":183,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":179},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":180},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":181}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":184},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":187},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":266,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":267,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":185},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":186},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":263},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":264},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":265}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":188},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":54,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":195},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":76,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":198},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":199},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":98,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":200},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":115,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":201},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":202},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":142,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":203},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":166,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":204},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":176,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":205},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":195,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":206}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":189},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":190},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":191},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":192},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":193},{"id":"WebSocketManager#gateway","longname":"WebSocketManager#gateway","name":"gateway","scope":"instance","kind":"member","description":"The gateway address for this WebSocket connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":46,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":194},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":59,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":196},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":197}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":207},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":209},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":210}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":208}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":23},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":25},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":27}}}} \ No newline at end of file +{"meta":{"version":7},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":120,"filename":"Client.js","path":"src/client"},"order":15}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":32,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#dataManager","longname":"Client#dataManager","name":"dataManager","scope":"instance","kind":"member","description":"The data manager of the Client","memberof":"Client","type":[[[["ClientDataManager"],""]]],"access":"private","meta":{"lineno":38,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":44,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":56,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":62,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":68,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":73,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":78,"filename":"Client.js","path":"src/client"},"order":10},{"id":"Client#token","longname":"Client#token","name":"token","scope":"instance","kind":"member","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":83,"filename":"Client.js","path":"src/client"},"order":11},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The ClientUser representing the logged in Client","memberof":"Client","type":[[[["ClientUser"],""]]],"nullable":true,"meta":{"lineno":88,"filename":"Client.js","path":"src/client"},"order":12},{"id":"Client#email","longname":"Client#email","name":"email","scope":"instance","kind":"member","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":13},{"id":"Client#password","longname":"Client#password","name":"password","scope":"instance","kind":"member","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":98,"filename":"Client.js","path":"src/client"},"order":14}],"events":[],"constructor":{"id":"Client()","longname":"Client","name":"Client","kind":"constructor","description":"Creates an instance of Client.","memberof":"Client","params":[{"type":{"names":["Object"]},"optional":true,"description":"options to pass to the client","name":"options"}],"order":1}},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":23},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":25},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":27},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":29}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":30},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":33},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":34}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":31},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":32}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":35},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":38}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":36},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":37}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":39},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":42},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":43},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":44},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":45},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":284},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":285},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":286},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":287},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":288}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":41},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":277},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":278},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":279},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":280},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":281},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":282},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":283}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":46},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":49},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":240},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":241},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":249}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":47},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":48},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":239},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":247},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":248}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":50},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":117,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":131,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":143,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":154,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":188,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":328,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":341,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":354,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":367,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":384,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":398,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":412,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":426,"filename":"Guild.js","path":"src/structures"},"order":85},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":440,"filename":"Guild.js","path":"src/structures"},"order":86},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":454,"filename":"Guild.js","path":"src/structures"},"order":87},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":468,"filename":"Guild.js","path":"src/structures"},"order":88},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":482,"filename":"Guild.js","path":"src/structures"},"order":89},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":496,"filename":"Guild.js","path":"src/structures"},"order":90}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":240,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":245,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":250,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":255,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":269,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":282,"filename":"Guild.js","path":"src/structures"},"order":77}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":91},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":99},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":100},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":101},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":102},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":103},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":276}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":274},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":275}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":104},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":120},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":121},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":245},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":246}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":117},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":118},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":119}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":122},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":137},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":138},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":139}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":134},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":135},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":136}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":140},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":141},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":142},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":143}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":144},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":157},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":158},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":159},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":160},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":161},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":162}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":153}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":163},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":243},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":244},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":256},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":257},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":258},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":259},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":260},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":261}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":242},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":255}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":164},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":172},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":173},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":174},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":237},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":238}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":169},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":170},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":171}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":175},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":179},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":268},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":269},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":270},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":271},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":272},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":273}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":176},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":177},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":178},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":262},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":263},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":264},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":265},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":266},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":267}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":189},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":193,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":194,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":190},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":191},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":192}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":195},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":198},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":292,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":293,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":196},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":197},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":289},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":290},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":291}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":212},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":54,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":219},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":76,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":222},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":223},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":98,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":224},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":115,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":225},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":226},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":142,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":227},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":166,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":228},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":176,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":229},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":200,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":231}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":213},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":214},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":215},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":216},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":217},{"id":"WebSocketManager#gateway","longname":"WebSocketManager#gateway","name":"gateway","scope":"instance","kind":"member","description":"The gateway address for this WebSocket connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":46,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":218},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":59,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":220},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":221}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":233},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":235},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":236}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":234}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":24},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":26},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":28}}}} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js index 70c2d2cea..89d3e007b 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -80,12 +80,20 @@ function firstPass() { return cleaned; } +const seenEvents = {}; + function clean() { const cleaned = firstPass(); for (const item of json) { if (!item) { continue; } + if (item.kind === 'event') { + if (seenEvents[item.name]) { + console.log('dupe logs for', item.name); + } + seenEvents[item.name] = true; + } if (item.kind === 'member') { const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; const newTypes = []; diff --git a/src/client/ClientDataManager.js b/src/client/ClientDataManager.js index 35516b9db..f9d859145 100644 --- a/src/client/ClientDataManager.js +++ b/src/client/ClientDataManager.js @@ -21,6 +21,12 @@ class ClientDataManager { const guild = new Guild(this.client, data); this.client.guilds.set(guild.id, guild); if (this.pastReady && !already) { + /** + * Emitted whenever the client joins a Guild. + * + * @event Client#guildCreate + * @param {Guild} guild the created guild. + */ this.client.emit(Constants.Events.GUILD_CREATE, guild); } diff --git a/src/client/actions/ChannelUpdate.js b/src/client/actions/ChannelUpdate.js index 799047306..ecf74215a 100644 --- a/src/client/actions/ChannelUpdate.js +++ b/src/client/actions/ChannelUpdate.js @@ -28,4 +28,12 @@ class ChannelUpdateAction extends Action { } } +/** +* Emitted whenever a channel is updated - e.g. name change, topic change. +* +* @event Client#channelUpdate +* @param {Channel} oldChannel the channel before the update +* @param {Channel} newChannel the channel after the update +*/ + module.exports = ChannelUpdateAction; diff --git a/src/client/actions/GuildDelete.js b/src/client/actions/GuildDelete.js index b37ab7738..e11beda46 100644 --- a/src/client/actions/GuildDelete.js +++ b/src/client/actions/GuildDelete.js @@ -46,4 +46,11 @@ class GuildDeleteAction extends Action { } } +/** +* Emitted whenever a guild becomes unavailable, likely due to a server outage. +* +* @event Client#guildUnavailable +* @param {Guild} guild the guild that has become unavailable. +*/ + module.exports = GuildDeleteAction; diff --git a/src/client/actions/GuildMemberRemove.js b/src/client/actions/GuildMemberRemove.js index 2a20ddf65..004a995bf 100644 --- a/src/client/actions/GuildMemberRemove.js +++ b/src/client/actions/GuildMemberRemove.js @@ -45,4 +45,14 @@ class GuildMemberRemoveAction extends Action { } } + +/** +* Emitted whenever a member leaves a guild, or is kicked. +* +* @event Client#guildMemberRemove +* @param {Guild} guild the guild that the member has left. +* @param {GuildMember} member the member that has left the guild. +*/ + + module.exports = GuildMemberRemoveAction; diff --git a/src/client/actions/GuildRoleCreate.js b/src/client/actions/GuildRoleCreate.js index 58cf4b401..a65009682 100644 --- a/src/client/actions/GuildRoleCreate.js +++ b/src/client/actions/GuildRoleCreate.js @@ -28,4 +28,14 @@ class GuildRoleCreate extends Action { } } + +/** +* Emitted whenever a guild role is created. +* +* @event Client#guildRoleCreate +* @param {Guild} guild the guild that the role was created in. +* @param {Role} role the role that was created. +*/ + + module.exports = GuildRoleCreate; diff --git a/src/client/actions/GuildRoleDelete.js b/src/client/actions/GuildRoleDelete.js index 9c22cff27..e5a8db0fc 100644 --- a/src/client/actions/GuildRoleDelete.js +++ b/src/client/actions/GuildRoleDelete.js @@ -44,4 +44,12 @@ class GuildRoleDeleteAction extends Action { } } +/** +* Emitted whenever a guild role is deleted. +* +* @event Client#guildRoleDelete +* @param {Guild} guild the guild that the role was deleted in. +* @param {Role} role the role that was deleted. +*/ + module.exports = GuildRoleDeleteAction; diff --git a/src/client/actions/GuildRoleUpdate.js b/src/client/actions/GuildRoleUpdate.js index 992e76772..30201ecef 100644 --- a/src/client/actions/GuildRoleUpdate.js +++ b/src/client/actions/GuildRoleUpdate.js @@ -33,4 +33,13 @@ class GuildRoleUpdateAction extends Action { } } +/** +* Emitted whenever a guild role is updated. +* +* @event Client#guildRoleUpdated +* @param {Guild} guild the guild that the role was updated in. +* @param {Role} oldRole the role before the update. +* @param {Role} newRole the role after the update. +*/ + module.exports = GuildRoleUpdateAction; diff --git a/src/client/actions/GuildUpdate.js b/src/client/actions/GuildUpdate.js index 8d73c9329..0b7f05f72 100644 --- a/src/client/actions/GuildUpdate.js +++ b/src/client/actions/GuildUpdate.js @@ -35,4 +35,12 @@ class GuildUpdateAction extends Action { } } +/** +* Emitted whenever a guild is updated - e.g. name change. +* +* @event Client#guildUpdate +* @param {Guild} oldGuild the guild before the update. +* @param {Guild} newGuild the guild after the update. +*/ + module.exports = GuildUpdateAction; diff --git a/src/client/actions/MessageUpdate.js b/src/client/actions/MessageUpdate.js index 7985fae13..644e90c57 100644 --- a/src/client/actions/MessageUpdate.js +++ b/src/client/actions/MessageUpdate.js @@ -33,4 +33,12 @@ class MessageUpdateAction extends Action { } } +/** +* Emitted whenever a message is updated - e.g. embed or content change. +* +* @event Client#messageUpdate +* @param {Message} oldMessage the message before the update. +* @param {Message} newMessage the message after the update. +*/ + module.exports = MessageUpdateAction; diff --git a/src/client/actions/UserUpdate.js b/src/client/actions/UserUpdate.js index 1e15837f2..924e25287 100644 --- a/src/client/actions/UserUpdate.js +++ b/src/client/actions/UserUpdate.js @@ -33,4 +33,12 @@ class UserUpdateAction extends Action { } } +/** +* Emitted whenever a detail of the logged in User changes - e.g. username. +* +* @event Client#userUpdate +* @param {ClientUser} oldClientUser the client user before the update. +* @param {ClientUser} newClientUser the client user after the update. +*/ + module.exports = UserUpdateAction; diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 8d87ad6ee..39aedae19 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -182,6 +182,11 @@ class WebSocketManager { if (unavailableCount === 0) { this.status = Constants.Status.READY; + /** + * Emitted when the Client becomes ready to start working + * + * @event Client#ready + */ this.client.emit(Constants.Events.READY); this.packetManager.handleQueue(); } @@ -196,6 +201,11 @@ class WebSocketManager { this.status = Constants.Status.RECONNECTING; this.ws.close(); this.packetManager.handleQueue(); + /** + * Emitted when the Client tries to reconnect after being disconnected + * + * @event Client#reconnecting + */ this.client.emit(Constants.Events.RECONNECTING); this.connect(this.client.ws.gateway); } diff --git a/src/client/websocket/packets/handlers/ChannelCreate.js b/src/client/websocket/packets/handlers/ChannelCreate.js index bf81ee6ce..e4c36db14 100644 --- a/src/client/websocket/packets/handlers/ChannelCreate.js +++ b/src/client/websocket/packets/handlers/ChannelCreate.js @@ -17,4 +17,11 @@ class ChannelCreateHandler extends AbstractHandler { } +/** +* Emitted whenever a Channel is created. +* +* @event Client#channelCreate +* @param {Channel} channel The channel that was created +*/ + module.exports = ChannelCreateHandler; diff --git a/src/client/websocket/packets/handlers/ChannelDelete.js b/src/client/websocket/packets/handlers/ChannelDelete.js index fc47f1858..b93ca51c1 100644 --- a/src/client/websocket/packets/handlers/ChannelDelete.js +++ b/src/client/websocket/packets/handlers/ChannelDelete.js @@ -17,4 +17,11 @@ class ChannelDeleteHandler extends AbstractHandler { } +/** +* Emitted whenever a Channel is deleted. +* +* @event Client#channelDelete +* @param {Channel} channel The channel that was deleted +*/ + module.exports = ChannelDeleteHandler; diff --git a/src/client/websocket/packets/handlers/GuildBanAdd.js b/src/client/websocket/packets/handlers/GuildBanAdd.js index f380480be..400651f75 100644 --- a/src/client/websocket/packets/handlers/GuildBanAdd.js +++ b/src/client/websocket/packets/handlers/GuildBanAdd.js @@ -19,4 +19,12 @@ class GuildBanAddHandler extends AbstractHandler { } +/** +* Emitted whenever a member is banned from a guild. +* +* @event Client#guildBanAdd +* @param {Guild} guild The guild that the ban occurred in +* @param {User} user The user that was banned +*/ + module.exports = GuildBanAddHandler; diff --git a/src/client/websocket/packets/handlers/GuildBanRemove.js b/src/client/websocket/packets/handlers/GuildBanRemove.js index 8cc5ce8de..3852e84ad 100644 --- a/src/client/websocket/packets/handlers/GuildBanRemove.js +++ b/src/client/websocket/packets/handlers/GuildBanRemove.js @@ -20,4 +20,12 @@ class GuildBanRemoveHandler extends AbstractHandler { } +/** +* Emitted whenever a member is unbanned from a guild. +* +* @event Client#guildBanRemove +* @param {Guild} guild The guild that the unban occurred in +* @param {User} user The user that was unbanned +*/ + module.exports = GuildBanRemoveHandler; diff --git a/src/client/websocket/packets/handlers/GuildDelete.js b/src/client/websocket/packets/handlers/GuildDelete.js index a86dbd2db..237652d7f 100644 --- a/src/client/websocket/packets/handlers/GuildDelete.js +++ b/src/client/websocket/packets/handlers/GuildDelete.js @@ -16,4 +16,11 @@ class GuildDeleteHandler extends AbstractHandler { } +/** +* Emitted whenever a Guild is deleted/left. +* +* @event Client#guildDelete +* @param {Guild} guild The guild that was deleted +*/ + module.exports = GuildDeleteHandler; diff --git a/src/client/websocket/packets/handlers/GuildMembersChunk.js b/src/client/websocket/packets/handlers/GuildMembersChunk.js index 3058c506d..4ab6a2aad 100644 --- a/src/client/websocket/packets/handlers/GuildMembersChunk.js +++ b/src/client/websocket/packets/handlers/GuildMembersChunk.js @@ -22,4 +22,12 @@ class GuildMembersChunkHandler extends AbstractHandler { } +/** +* Emitted whenever a chunk of Guild members is received +* +* @event Client#guildMembersChunk +* @param {Guild} guild The guild that the chunks relate to +* @param {Array} members The members in the chunk +*/ + module.exports = GuildMembersChunkHandler; diff --git a/src/client/websocket/packets/handlers/MessageCreate.js b/src/client/websocket/packets/handlers/MessageCreate.js index fcbd8028c..992d37368 100644 --- a/src/client/websocket/packets/handlers/MessageCreate.js +++ b/src/client/websocket/packets/handlers/MessageCreate.js @@ -16,4 +16,11 @@ class MessageCreateHandler extends AbstractHandler { } +/** +* Emitted whenever a message is created +* +* @event Client#message +* @param {Message} message The created message +*/ + module.exports = MessageCreateHandler; diff --git a/src/client/websocket/packets/handlers/MessageDelete.js b/src/client/websocket/packets/handlers/MessageDelete.js index e29b149d4..d387c8e6c 100644 --- a/src/client/websocket/packets/handlers/MessageDelete.js +++ b/src/client/websocket/packets/handlers/MessageDelete.js @@ -16,4 +16,11 @@ class MessageDeleteHandler extends AbstractHandler { } +/** +* Emitted whenever a message is deleted +* +* @event Client#messageDelete +* @param {Message} message The deleted message +*/ + module.exports = MessageDeleteHandler; diff --git a/src/client/websocket/packets/handlers/PresenceUpdate.js b/src/client/websocket/packets/handlers/PresenceUpdate.js index cdfa45415..a9ce16ca0 100644 --- a/src/client/websocket/packets/handlers/PresenceUpdate.js +++ b/src/client/websocket/packets/handlers/PresenceUpdate.js @@ -63,4 +63,21 @@ class PresenceUpdateHandler extends AbstractHandler { } +/** +* Emitted whenever a user changes one of their details or starts/stop playing a game +* +* @event Client#presenceUpdate +* @param {User} oldUser the user before the presence update +* @param {User} newUser the user after the presence update +*/ + +/** +* Emitted whenever a member becomes available in a large Guild +* +* @event Client#guildMemberAvailable +* @param {Guild} guild The guild that the member became available in +* @param {GuildMember} member the member that became available +*/ + + module.exports = PresenceUpdateHandler; diff --git a/src/client/websocket/packets/handlers/TypingStart.js b/src/client/websocket/packets/handlers/TypingStart.js index 967cc9740..599021112 100644 --- a/src/client/websocket/packets/handlers/TypingStart.js +++ b/src/client/websocket/packets/handlers/TypingStart.js @@ -49,4 +49,20 @@ class TypingStartHandler extends AbstractHandler { } +/** +* Emitted whenever a user starts typing in a channel +* +* @event Client#typingStart +* @param {Channel} channel the channel the user started typing in +* @param {User} user the user that started typing +*/ + +/** +* Emitted whenever a user stops typing in a channel +* +* @event Client#typingStop +* @param {Channel} channel the channel the user stopped typing in +* @param {User} user the user that stopped typing +*/ + module.exports = TypingStartHandler; diff --git a/src/client/websocket/packets/handlers/VoiceStateUpdate.js b/src/client/websocket/packets/handlers/VoiceStateUpdate.js index 53035076e..1d89a6886 100644 --- a/src/client/websocket/packets/handlers/VoiceStateUpdate.js +++ b/src/client/websocket/packets/handlers/VoiceStateUpdate.js @@ -31,4 +31,12 @@ class VoiceStateUpdateHandler extends AbstractHandler { } +/** +* Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes. +* +* @event Client#voiceStateUpdate +* @param {GuildMember} oldMember the member before the voice state update +* @param {GuildMember} newMember the member before the voice state update +*/ + module.exports = VoiceStateUpdateHandler; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 727a5281f..d94a22ff8 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -88,6 +88,14 @@ class Guild { member._roles = data.roles; if (this.client.ws.status === Constants.Status.READY) { + /** + * Emitted whenever a Guild Member's Roles change - i.e. new role or removed role + * + * @event Client#guildMemberRolesUpdate + * @param {Guild} guild the guild that the update affects + * @param {Array} oldRoles the roles before the update + * @param {Guild} newRoles the roles after the update + */ this.client.emit(Constants.Events.GUILD_MEMBER_ROLES_UPDATE, this, oldRoles, member.roles); } } diff --git a/src/util/Constants.js b/src/util/Constants.js index abe9bf778..acabd1046 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -121,6 +121,7 @@ exports.Events = { MESSAGE_CREATE: 'message', MESSAGE_DELETE: 'messageDelete', MESSAGE_UPDATE: 'messageUpdate', + RECONNECTING: 'reconnecting', }; exports.WSEvents = { From 2007ed7cefa8813b7d1f698485f305be52526958 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 20 Aug 2016 00:20:51 +0100 Subject: [PATCH 117/324] Allow the doc gen to understand events --- docs/docs.json | 2 +- docs/gen/index.js | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 3533e35d2..01eb675ad 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":7},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":120,"filename":"Client.js","path":"src/client"},"order":15}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":32,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#dataManager","longname":"Client#dataManager","name":"dataManager","scope":"instance","kind":"member","description":"The data manager of the Client","memberof":"Client","type":[[[["ClientDataManager"],""]]],"access":"private","meta":{"lineno":38,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":44,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":56,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":62,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":68,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":73,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":78,"filename":"Client.js","path":"src/client"},"order":10},{"id":"Client#token","longname":"Client#token","name":"token","scope":"instance","kind":"member","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":83,"filename":"Client.js","path":"src/client"},"order":11},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The ClientUser representing the logged in Client","memberof":"Client","type":[[[["ClientUser"],""]]],"nullable":true,"meta":{"lineno":88,"filename":"Client.js","path":"src/client"},"order":12},{"id":"Client#email","longname":"Client#email","name":"email","scope":"instance","kind":"member","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":13},{"id":"Client#password","longname":"Client#password","name":"password","scope":"instance","kind":"member","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":98,"filename":"Client.js","path":"src/client"},"order":14}],"events":[],"constructor":{"id":"Client()","longname":"Client","name":"Client","kind":"constructor","description":"Creates an instance of Client.","memberof":"Client","params":[{"type":{"names":["Object"]},"optional":true,"description":"options to pass to the client","name":"options"}],"order":1}},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":23},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":25},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":27},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":29}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":30},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":33},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":34}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":31},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":32}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":35},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":38}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":36},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":37}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":39},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":42},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":43},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":44},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":45},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":284},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":285},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":286},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":287},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":288}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":41},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":277},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":278},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":279},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":280},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":281},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":282},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":283}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":46},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":49},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":240},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":241},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":249}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":47},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":48},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":239},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":247},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":248}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":50},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":117,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":131,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":143,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":154,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":188,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":328,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":341,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":354,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":367,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":384,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":398,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":412,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":426,"filename":"Guild.js","path":"src/structures"},"order":85},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":440,"filename":"Guild.js","path":"src/structures"},"order":86},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":454,"filename":"Guild.js","path":"src/structures"},"order":87},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":468,"filename":"Guild.js","path":"src/structures"},"order":88},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":482,"filename":"Guild.js","path":"src/structures"},"order":89},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":496,"filename":"Guild.js","path":"src/structures"},"order":90}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":240,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":245,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":250,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":255,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":269,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":282,"filename":"Guild.js","path":"src/structures"},"order":77}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":91},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":99},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":100},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":101},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":102},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":103},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":276}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":274},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":275}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":104},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":120},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":121},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":245},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":246}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":117},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":118},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":119}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":122},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":137},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":138},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":139}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":134},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":135},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":136}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":140},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":141},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":142},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":143}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":144},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":157},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":158},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":159},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":160},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":161},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":162}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":153}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":163},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":243},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":244},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":256},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":257},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":258},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":259},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":260},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":261}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":242},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":255}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":164},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":172},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":173},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":174},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":237},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":238}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":169},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":170},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":171}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":175},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":179},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":268},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":269},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":270},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":271},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":272},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":273}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":176},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":177},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":178},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":262},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":263},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":264},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":265},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":266},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":267}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":189},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":193,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":194,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":190},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":191},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":192}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":195},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":198},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":292,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":293,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":196},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":197},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":289},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":290},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":291}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":212},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":54,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":219},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":76,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":222},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":223},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":98,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":224},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":115,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":225},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":226},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":142,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":227},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":166,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":228},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":176,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":229},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":200,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":231}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":213},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":214},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":215},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":216},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":217},{"id":"WebSocketManager#gateway","longname":"WebSocketManager#gateway","name":"gateway","scope":"instance","kind":"member","description":"The gateway address for this WebSocket connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":46,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":218},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":59,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":220},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":221}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":233},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":235},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":236}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":234}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":24},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":26},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":28}}}} \ No newline at end of file +{"meta":{"version":8},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":120,"filename":"Client.js","path":"src/client"},"order":15}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":32,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#dataManager","longname":"Client#dataManager","name":"dataManager","scope":"instance","kind":"member","description":"The data manager of the Client","memberof":"Client","type":[[[["ClientDataManager"],""]]],"access":"private","meta":{"lineno":38,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":44,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":56,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":62,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":68,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":73,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":78,"filename":"Client.js","path":"src/client"},"order":10},{"id":"Client#token","longname":"Client#token","name":"token","scope":"instance","kind":"member","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":83,"filename":"Client.js","path":"src/client"},"order":11},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The ClientUser representing the logged in Client","memberof":"Client","type":[[[["ClientUser"],""]]],"nullable":true,"meta":{"lineno":88,"filename":"Client.js","path":"src/client"},"order":12},{"id":"Client#email","longname":"Client#email","name":"email","scope":"instance","kind":"member","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":13},{"id":"Client#password","longname":"Client#password","name":"password","scope":"instance","kind":"member","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":98,"filename":"Client.js","path":"src/client"},"order":14}],"events":[{"id":"Client#event:guildCreate","longname":"Client#event:guildCreate","name":"guildCreate","scope":"instance","kind":"event","description":"Emitted whenever the client joins a Guild.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the created guild.","name":"guild"}],"meta":{"lineno":24,"filename":"ClientDataManager.js","path":"src/client"},"order":16},{"id":"Client#event:guildMemberRolesUpdate","longname":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","scope":"instance","kind":"event","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the guild that the update affects","name":"guild"},{"type":{"names":["Array."]},"description":"the roles before the update","name":"oldRoles"},{"type":{"names":["Guild"]},"description":"the roles after the update","name":"newRoles"}],"meta":{"lineno":91,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Client#event:channelUpdate","longname":"Client#event:channelUpdate","name":"channelUpdate","scope":"instance","kind":"event","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","params":[{"type":{"names":["Channel"]},"description":"the channel before the update","name":"oldChannel"},{"type":{"names":["Channel"]},"description":"the channel after the update","name":"newChannel"}],"meta":{"lineno":31,"filename":"ChannelUpdate.js","path":"src/client/actions"},"order":180},{"id":"Client#event:guildUnavailable","longname":"Client#event:guildUnavailable","name":"guildUnavailable","scope":"instance","kind":"event","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the guild that has become unavailable.","name":"guild"}],"meta":{"lineno":49,"filename":"GuildDelete.js","path":"src/client/actions"},"order":181},{"id":"Client#event:guildMemberRemove","longname":"Client#event:guildMemberRemove","name":"guildMemberRemove","scope":"instance","kind":"event","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the guild that the member has left.","name":"guild"},{"type":{"names":["GuildMember"]},"description":"the member that has left the guild.","name":"member"}],"meta":{"lineno":49,"filename":"GuildMemberRemove.js","path":"src/client/actions"},"order":182},{"id":"Client#event:guildRoleCreate","longname":"Client#event:guildRoleCreate","name":"guildRoleCreate","scope":"instance","kind":"event","description":"Emitted whenever a guild role is created.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the guild that the role was created in.","name":"guild"},{"type":{"names":["Role"]},"description":"the role that was created.","name":"role"}],"meta":{"lineno":32,"filename":"GuildRoleCreate.js","path":"src/client/actions"},"order":183},{"id":"Client#event:guildRoleDelete","longname":"Client#event:guildRoleDelete","name":"guildRoleDelete","scope":"instance","kind":"event","description":"Emitted whenever a guild role is deleted.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the guild that the role was deleted in.","name":"guild"},{"type":{"names":["Role"]},"description":"the role that was deleted.","name":"role"}],"meta":{"lineno":47,"filename":"GuildRoleDelete.js","path":"src/client/actions"},"order":184},{"id":"Client#event:guildRoleUpdated","longname":"Client#event:guildRoleUpdated","name":"guildRoleUpdated","scope":"instance","kind":"event","description":"Emitted whenever a guild role is updated.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the guild that the role was updated in.","name":"guild"},{"type":{"names":["Role"]},"description":"the role before the update.","name":"oldRole"},{"type":{"names":["Role"]},"description":"the role after the update.","name":"newRole"}],"meta":{"lineno":36,"filename":"GuildRoleUpdate.js","path":"src/client/actions"},"order":185},{"id":"Client#event:guildUpdate","longname":"Client#event:guildUpdate","name":"guildUpdate","scope":"instance","kind":"event","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the guild before the update.","name":"oldGuild"},{"type":{"names":["Guild"]},"description":"the guild after the update.","name":"newGuild"}],"meta":{"lineno":38,"filename":"GuildUpdate.js","path":"src/client/actions"},"order":186},{"id":"Client#event:messageUpdate","longname":"Client#event:messageUpdate","name":"messageUpdate","scope":"instance","kind":"event","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","params":[{"type":{"names":["Message"]},"description":"the message before the update.","name":"oldMessage"},{"type":{"names":["Message"]},"description":"the message after the update.","name":"newMessage"}],"meta":{"lineno":36,"filename":"MessageUpdate.js","path":"src/client/actions"},"order":187},{"id":"Client#event:userUpdate","longname":"Client#event:userUpdate","name":"userUpdate","scope":"instance","kind":"event","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","params":[{"type":{"names":["ClientUser"]},"description":"the client user before the update.","name":"oldClientUser"},{"type":{"names":["ClientUser"]},"description":"the client user after the update.","name":"newClientUser"}],"meta":{"lineno":36,"filename":"UserUpdate.js","path":"src/client/actions"},"order":188},{"id":"Client#event:channelCreate","longname":"Client#event:channelCreate","name":"channelCreate","scope":"instance","kind":"event","description":"Emitted whenever a Channel is created.","memberof":"Client","params":[{"type":{"names":["Channel"]},"description":"The channel that was created","name":"channel"}],"meta":{"lineno":20,"filename":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"order":199},{"id":"Client#event:channelDelete","longname":"Client#event:channelDelete","name":"channelDelete","scope":"instance","kind":"event","description":"Emitted whenever a Channel is deleted.","memberof":"Client","params":[{"type":{"names":["Channel"]},"description":"The channel that was deleted","name":"channel"}],"meta":{"lineno":20,"filename":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"order":200},{"id":"Client#event:guildBanAdd","longname":"Client#event:guildBanAdd","name":"guildBanAdd","scope":"instance","kind":"event","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"The guild that the ban occurred in","name":"guild"},{"type":{"names":["User"]},"description":"The user that was banned","name":"user"}],"meta":{"lineno":22,"filename":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"order":201},{"id":"Client#event:guildBanRemove","longname":"Client#event:guildBanRemove","name":"guildBanRemove","scope":"instance","kind":"event","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"The guild that the unban occurred in","name":"guild"},{"type":{"names":["User"]},"description":"The user that was unbanned","name":"user"}],"meta":{"lineno":23,"filename":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"order":202},{"id":"Client#event:guildDelete","longname":"Client#event:guildDelete","name":"guildDelete","scope":"instance","kind":"event","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"The guild that was deleted","name":"guild"}],"meta":{"lineno":19,"filename":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"order":203},{"id":"Client#event:guildMembersChunk","longname":"Client#event:guildMembersChunk","name":"guildMembersChunk","scope":"instance","kind":"event","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"The guild that the chunks relate to","name":"guild"},{"type":{"names":["Array."]},"description":"The members in the chunk","name":"members"}],"meta":{"lineno":25,"filename":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"order":204},{"id":"Client#event:message","longname":"Client#event:message","name":"message","scope":"instance","kind":"event","description":"Emitted whenever a message is created","memberof":"Client","params":[{"type":{"names":["Message"]},"description":"The created message","name":"message"}],"meta":{"lineno":19,"filename":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"order":205},{"id":"Client#event:messageDelete","longname":"Client#event:messageDelete","name":"messageDelete","scope":"instance","kind":"event","description":"Emitted whenever a message is deleted","memberof":"Client","params":[{"type":{"names":["Message"]},"description":"The deleted message","name":"message"}],"meta":{"lineno":19,"filename":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"order":206},{"id":"Client#event:presenceUpdate","longname":"Client#event:presenceUpdate","name":"presenceUpdate","scope":"instance","kind":"event","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","params":[{"type":{"names":["User"]},"description":"the user before the presence update","name":"oldUser"},{"type":{"names":["User"]},"description":"the user after the presence update","name":"newUser"}],"meta":{"lineno":66,"filename":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"order":207},{"id":"Client#event:guildMemberAvailable","longname":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","scope":"instance","kind":"event","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"The guild that the member became available in","name":"guild"},{"type":{"names":["GuildMember"]},"description":"the member that became available","name":"member"}],"meta":{"lineno":74,"filename":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"order":208},{"id":"Client#event:typingStart","longname":"Client#event:typingStart","name":"typingStart","scope":"instance","kind":"event","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","params":[{"type":{"names":["Channel"]},"description":"the channel the user started typing in","name":"channel"},{"type":{"names":["User"]},"description":"the user that started typing","name":"user"}],"meta":{"lineno":52,"filename":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"order":209},{"id":"Client#event:typingStop","longname":"Client#event:typingStop","name":"typingStop","scope":"instance","kind":"event","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","params":[{"type":{"names":["Channel"]},"description":"the channel the user stopped typing in","name":"channel"},{"type":{"names":["User"]},"description":"the user that stopped typing","name":"user"}],"meta":{"lineno":60,"filename":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"order":210},{"id":"Client#event:voiceStateUpdate","longname":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","scope":"instance","kind":"event","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","params":[{"type":{"names":["GuildMember"]},"description":"the member before the voice state update","name":"oldMember"},{"type":{"names":["GuildMember"]},"description":"the member before the voice state update","name":"newMember"}],"meta":{"lineno":34,"filename":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"order":211},{"id":"Client#event:ready","longname":"Client#event:ready","name":"ready","scope":"instance","kind":"event","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"lineno":185,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":230},{"id":"Client#event:reconnecting","longname":"Client#event:reconnecting","name":"reconnecting","scope":"instance","kind":"event","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"lineno":204,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":232}],"constructor":{"id":"Client()","longname":"Client","name":"Client","kind":"constructor","description":"Creates an instance of Client.","memberof":"Client","params":[{"type":{"names":["Object"]},"optional":true,"description":"options to pass to the client","name":"options"}],"order":1}},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":23},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":25},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":27},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":29}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":30},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":33},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":34}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":31},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":32}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":35},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":38}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":36},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":37}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":39},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":42},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":43},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":44},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":45},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":284},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":285},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":286},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":287},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":288}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":41},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":277},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":278},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":279},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":280},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":281},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":282},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":283}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":46},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":49},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":240},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":241},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":249}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":47},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":48},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":239},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":247},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":248}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":50},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":117,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":131,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":143,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":154,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":188,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":328,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":341,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":354,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":367,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":384,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":398,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":412,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":426,"filename":"Guild.js","path":"src/structures"},"order":85},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":440,"filename":"Guild.js","path":"src/structures"},"order":86},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":454,"filename":"Guild.js","path":"src/structures"},"order":87},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":468,"filename":"Guild.js","path":"src/structures"},"order":88},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":482,"filename":"Guild.js","path":"src/structures"},"order":89},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":496,"filename":"Guild.js","path":"src/structures"},"order":90}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":240,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":245,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":250,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":255,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":269,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":282,"filename":"Guild.js","path":"src/structures"},"order":77}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":91},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":99},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":100},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":101},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":102},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":103},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":276}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":274},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":275}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":104},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":120},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":121},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":245},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":246}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":117},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":118},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":119}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":122},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":137},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":138},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":139}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":134},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":135},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":136}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":140},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":141},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":142},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":143}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":144},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":157},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":158},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":159},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":160},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":161},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":162}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":153}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":163},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":243},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":244},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":256},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":257},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":258},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":259},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":260},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":261}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":242},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":255}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":164},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":172},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":173},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":174},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":237},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":238}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":169},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":170},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":171}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":175},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":179},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":268},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":269},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":270},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":271},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":272},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":273}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":176},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":177},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":178},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":262},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":263},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":264},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":265},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":266},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":267}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":189},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":193,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":194,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":190},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":191},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":192}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":195},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":198},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":292,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":293,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":196},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":197},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":289},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":290},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":291}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":212},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":54,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":219},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":76,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":222},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":223},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":98,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":224},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":115,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":225},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":226},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":142,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":227},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":166,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":228},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":176,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":229},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":200,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":231}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":213},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":214},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":215},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":216},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":217},{"id":"WebSocketManager#gateway","longname":"WebSocketManager#gateway","name":"gateway","scope":"instance","kind":"member","description":"The gateway address for this WebSocket connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":46,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":218},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":59,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":220},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":221}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":233},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":235},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":236}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":234}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":24},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":26},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":28}}}} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js index 89d3e007b..17020d396 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -4,7 +4,7 @@ let parse; const customDocs = require('../custom/index'); -const GEN_VERSION = 7; +const GEN_VERSION = 8; try { fs = require('fs-extra'); @@ -88,12 +88,6 @@ function clean() { if (!item) { continue; } - if (item.kind === 'event') { - if (seenEvents[item.name]) { - console.log('dupe logs for', item.name); - } - seenEvents[item.name] = true; - } if (item.kind === 'member') { const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; const newTypes = []; @@ -122,6 +116,13 @@ function clean() { } else if (item.kind === 'constructor') { const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; obj.constructor = item; + } else if (item.kind === 'event') { + if (seenEvents[item.name]) { + console.log('dupe logs for', item.name); + } + seenEvents[item.name] = true; + const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; + obj.events.push(item); } } json = cleaned; From 24f3a36701bcf49f5960d173e86d1d7d3995797e Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 20 Aug 2016 16:05:50 +0100 Subject: [PATCH 118/324] update doc gen --- docs/gen/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/gen/index.js b/docs/gen/index.js index 17020d396..55c7fc7f4 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -4,7 +4,7 @@ let parse; const customDocs = require('../custom/index'); -const GEN_VERSION = 8; +const GEN_VERSION = 9; try { fs = require('fs-extra'); @@ -122,6 +122,11 @@ function clean() { } seenEvents[item.name] = true; const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; + const newParams = []; + for (const param of item.params) { + newParams.push(matchReturnName(param.name)); + } + item.params = newParams; obj.events.push(item); } } From c5ab580562a0a9c292f2f44d70418da372dbf5dd Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 20 Aug 2016 16:09:02 +0100 Subject: [PATCH 119/324] fix docs --- docs/gen/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/gen/index.js b/docs/gen/index.js index 55c7fc7f4..76872f605 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -122,11 +122,11 @@ function clean() { } seenEvents[item.name] = true; const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; - const newParams = []; - for (const param of item.params) { - newParams.push(matchReturnName(param.name)); + const newTypes = []; + for (const name of item.type.names) { + newTypes.push(matchReturnName(name)); } - item.params = newParams; + item.type = newTypes; obj.events.push(item); } } From c7df7a4744bbf38ad0094abc27747ad954debc88 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 20 Aug 2016 16:14:34 +0100 Subject: [PATCH 120/324] build docs --- docs/docs.json | 2 +- docs/gen/index.js | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 01eb675ad..aaab02d5c 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":8},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":120,"filename":"Client.js","path":"src/client"},"order":15}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":32,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#dataManager","longname":"Client#dataManager","name":"dataManager","scope":"instance","kind":"member","description":"The data manager of the Client","memberof":"Client","type":[[[["ClientDataManager"],""]]],"access":"private","meta":{"lineno":38,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":44,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":56,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":62,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":68,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":73,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":78,"filename":"Client.js","path":"src/client"},"order":10},{"id":"Client#token","longname":"Client#token","name":"token","scope":"instance","kind":"member","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":83,"filename":"Client.js","path":"src/client"},"order":11},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The ClientUser representing the logged in Client","memberof":"Client","type":[[[["ClientUser"],""]]],"nullable":true,"meta":{"lineno":88,"filename":"Client.js","path":"src/client"},"order":12},{"id":"Client#email","longname":"Client#email","name":"email","scope":"instance","kind":"member","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":13},{"id":"Client#password","longname":"Client#password","name":"password","scope":"instance","kind":"member","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":98,"filename":"Client.js","path":"src/client"},"order":14}],"events":[{"id":"Client#event:guildCreate","longname":"Client#event:guildCreate","name":"guildCreate","scope":"instance","kind":"event","description":"Emitted whenever the client joins a Guild.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the created guild.","name":"guild"}],"meta":{"lineno":24,"filename":"ClientDataManager.js","path":"src/client"},"order":16},{"id":"Client#event:guildMemberRolesUpdate","longname":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","scope":"instance","kind":"event","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the guild that the update affects","name":"guild"},{"type":{"names":["Array."]},"description":"the roles before the update","name":"oldRoles"},{"type":{"names":["Guild"]},"description":"the roles after the update","name":"newRoles"}],"meta":{"lineno":91,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Client#event:channelUpdate","longname":"Client#event:channelUpdate","name":"channelUpdate","scope":"instance","kind":"event","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","params":[{"type":{"names":["Channel"]},"description":"the channel before the update","name":"oldChannel"},{"type":{"names":["Channel"]},"description":"the channel after the update","name":"newChannel"}],"meta":{"lineno":31,"filename":"ChannelUpdate.js","path":"src/client/actions"},"order":180},{"id":"Client#event:guildUnavailable","longname":"Client#event:guildUnavailable","name":"guildUnavailable","scope":"instance","kind":"event","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the guild that has become unavailable.","name":"guild"}],"meta":{"lineno":49,"filename":"GuildDelete.js","path":"src/client/actions"},"order":181},{"id":"Client#event:guildMemberRemove","longname":"Client#event:guildMemberRemove","name":"guildMemberRemove","scope":"instance","kind":"event","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the guild that the member has left.","name":"guild"},{"type":{"names":["GuildMember"]},"description":"the member that has left the guild.","name":"member"}],"meta":{"lineno":49,"filename":"GuildMemberRemove.js","path":"src/client/actions"},"order":182},{"id":"Client#event:guildRoleCreate","longname":"Client#event:guildRoleCreate","name":"guildRoleCreate","scope":"instance","kind":"event","description":"Emitted whenever a guild role is created.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the guild that the role was created in.","name":"guild"},{"type":{"names":["Role"]},"description":"the role that was created.","name":"role"}],"meta":{"lineno":32,"filename":"GuildRoleCreate.js","path":"src/client/actions"},"order":183},{"id":"Client#event:guildRoleDelete","longname":"Client#event:guildRoleDelete","name":"guildRoleDelete","scope":"instance","kind":"event","description":"Emitted whenever a guild role is deleted.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the guild that the role was deleted in.","name":"guild"},{"type":{"names":["Role"]},"description":"the role that was deleted.","name":"role"}],"meta":{"lineno":47,"filename":"GuildRoleDelete.js","path":"src/client/actions"},"order":184},{"id":"Client#event:guildRoleUpdated","longname":"Client#event:guildRoleUpdated","name":"guildRoleUpdated","scope":"instance","kind":"event","description":"Emitted whenever a guild role is updated.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the guild that the role was updated in.","name":"guild"},{"type":{"names":["Role"]},"description":"the role before the update.","name":"oldRole"},{"type":{"names":["Role"]},"description":"the role after the update.","name":"newRole"}],"meta":{"lineno":36,"filename":"GuildRoleUpdate.js","path":"src/client/actions"},"order":185},{"id":"Client#event:guildUpdate","longname":"Client#event:guildUpdate","name":"guildUpdate","scope":"instance","kind":"event","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"the guild before the update.","name":"oldGuild"},{"type":{"names":["Guild"]},"description":"the guild after the update.","name":"newGuild"}],"meta":{"lineno":38,"filename":"GuildUpdate.js","path":"src/client/actions"},"order":186},{"id":"Client#event:messageUpdate","longname":"Client#event:messageUpdate","name":"messageUpdate","scope":"instance","kind":"event","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","params":[{"type":{"names":["Message"]},"description":"the message before the update.","name":"oldMessage"},{"type":{"names":["Message"]},"description":"the message after the update.","name":"newMessage"}],"meta":{"lineno":36,"filename":"MessageUpdate.js","path":"src/client/actions"},"order":187},{"id":"Client#event:userUpdate","longname":"Client#event:userUpdate","name":"userUpdate","scope":"instance","kind":"event","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","params":[{"type":{"names":["ClientUser"]},"description":"the client user before the update.","name":"oldClientUser"},{"type":{"names":["ClientUser"]},"description":"the client user after the update.","name":"newClientUser"}],"meta":{"lineno":36,"filename":"UserUpdate.js","path":"src/client/actions"},"order":188},{"id":"Client#event:channelCreate","longname":"Client#event:channelCreate","name":"channelCreate","scope":"instance","kind":"event","description":"Emitted whenever a Channel is created.","memberof":"Client","params":[{"type":{"names":["Channel"]},"description":"The channel that was created","name":"channel"}],"meta":{"lineno":20,"filename":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"order":199},{"id":"Client#event:channelDelete","longname":"Client#event:channelDelete","name":"channelDelete","scope":"instance","kind":"event","description":"Emitted whenever a Channel is deleted.","memberof":"Client","params":[{"type":{"names":["Channel"]},"description":"The channel that was deleted","name":"channel"}],"meta":{"lineno":20,"filename":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"order":200},{"id":"Client#event:guildBanAdd","longname":"Client#event:guildBanAdd","name":"guildBanAdd","scope":"instance","kind":"event","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"The guild that the ban occurred in","name":"guild"},{"type":{"names":["User"]},"description":"The user that was banned","name":"user"}],"meta":{"lineno":22,"filename":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"order":201},{"id":"Client#event:guildBanRemove","longname":"Client#event:guildBanRemove","name":"guildBanRemove","scope":"instance","kind":"event","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"The guild that the unban occurred in","name":"guild"},{"type":{"names":["User"]},"description":"The user that was unbanned","name":"user"}],"meta":{"lineno":23,"filename":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"order":202},{"id":"Client#event:guildDelete","longname":"Client#event:guildDelete","name":"guildDelete","scope":"instance","kind":"event","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"The guild that was deleted","name":"guild"}],"meta":{"lineno":19,"filename":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"order":203},{"id":"Client#event:guildMembersChunk","longname":"Client#event:guildMembersChunk","name":"guildMembersChunk","scope":"instance","kind":"event","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"The guild that the chunks relate to","name":"guild"},{"type":{"names":["Array."]},"description":"The members in the chunk","name":"members"}],"meta":{"lineno":25,"filename":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"order":204},{"id":"Client#event:message","longname":"Client#event:message","name":"message","scope":"instance","kind":"event","description":"Emitted whenever a message is created","memberof":"Client","params":[{"type":{"names":["Message"]},"description":"The created message","name":"message"}],"meta":{"lineno":19,"filename":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"order":205},{"id":"Client#event:messageDelete","longname":"Client#event:messageDelete","name":"messageDelete","scope":"instance","kind":"event","description":"Emitted whenever a message is deleted","memberof":"Client","params":[{"type":{"names":["Message"]},"description":"The deleted message","name":"message"}],"meta":{"lineno":19,"filename":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"order":206},{"id":"Client#event:presenceUpdate","longname":"Client#event:presenceUpdate","name":"presenceUpdate","scope":"instance","kind":"event","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","params":[{"type":{"names":["User"]},"description":"the user before the presence update","name":"oldUser"},{"type":{"names":["User"]},"description":"the user after the presence update","name":"newUser"}],"meta":{"lineno":66,"filename":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"order":207},{"id":"Client#event:guildMemberAvailable","longname":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","scope":"instance","kind":"event","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","params":[{"type":{"names":["Guild"]},"description":"The guild that the member became available in","name":"guild"},{"type":{"names":["GuildMember"]},"description":"the member that became available","name":"member"}],"meta":{"lineno":74,"filename":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"order":208},{"id":"Client#event:typingStart","longname":"Client#event:typingStart","name":"typingStart","scope":"instance","kind":"event","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","params":[{"type":{"names":["Channel"]},"description":"the channel the user started typing in","name":"channel"},{"type":{"names":["User"]},"description":"the user that started typing","name":"user"}],"meta":{"lineno":52,"filename":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"order":209},{"id":"Client#event:typingStop","longname":"Client#event:typingStop","name":"typingStop","scope":"instance","kind":"event","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","params":[{"type":{"names":["Channel"]},"description":"the channel the user stopped typing in","name":"channel"},{"type":{"names":["User"]},"description":"the user that stopped typing","name":"user"}],"meta":{"lineno":60,"filename":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"order":210},{"id":"Client#event:voiceStateUpdate","longname":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","scope":"instance","kind":"event","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","params":[{"type":{"names":["GuildMember"]},"description":"the member before the voice state update","name":"oldMember"},{"type":{"names":["GuildMember"]},"description":"the member before the voice state update","name":"newMember"}],"meta":{"lineno":34,"filename":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"order":211},{"id":"Client#event:ready","longname":"Client#event:ready","name":"ready","scope":"instance","kind":"event","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"lineno":185,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":230},{"id":"Client#event:reconnecting","longname":"Client#event:reconnecting","name":"reconnecting","scope":"instance","kind":"event","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"lineno":204,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":232}],"constructor":{"id":"Client()","longname":"Client","name":"Client","kind":"constructor","description":"Creates an instance of Client.","memberof":"Client","params":[{"type":{"names":["Object"]},"optional":true,"description":"options to pass to the client","name":"options"}],"order":1}},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":23},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":25},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":27},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":29}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":30},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":33},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":34}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":31},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":32}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":35},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":38}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":36},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":37}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":39},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":42},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":43},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":44},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":45},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":284},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":285},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":286},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":287},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":288}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":41},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":277},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":278},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":279},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":280},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":281},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":282},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":283}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":46},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":49},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":240},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":241},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":249}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":47},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":48},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":239},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":247},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":248}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":50},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":117,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":131,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":143,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":154,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":188,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":328,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":341,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":354,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":367,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":384,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":398,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":412,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":426,"filename":"Guild.js","path":"src/structures"},"order":85},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":440,"filename":"Guild.js","path":"src/structures"},"order":86},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":454,"filename":"Guild.js","path":"src/structures"},"order":87},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":468,"filename":"Guild.js","path":"src/structures"},"order":88},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":482,"filename":"Guild.js","path":"src/structures"},"order":89},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":496,"filename":"Guild.js","path":"src/structures"},"order":90}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":240,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":245,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":250,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":255,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":269,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":282,"filename":"Guild.js","path":"src/structures"},"order":77}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":91},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":99},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":100},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":101},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":102},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":103},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":276}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":274},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":275}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":104},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":120},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":121},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":245},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":246}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":117},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":118},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":119}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":122},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":137},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":138},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":139}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":134},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":135},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":136}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":140},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":141},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":142},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":143}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":144},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":157},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":158},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":159},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":160},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":161},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":162}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":153}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":163},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":243},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":244},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":256},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":257},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":258},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":259},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":260},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":261}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":242},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":255}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":164},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":172},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":173},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":174},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":237},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":238}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":169},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":170},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":171}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":175},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":179},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":268},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":269},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":270},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":271},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":272},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":273}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":176},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":177},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":178},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":262},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":263},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":264},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":265},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":266},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":267}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":189},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":193,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":194,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":190},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":191},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":192}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":195},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":198},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":292,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":293,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":196},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":197},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":289},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":290},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":291}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":212},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":54,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":219},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":76,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":222},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":223},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":98,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":224},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":115,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":225},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":226},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":142,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":227},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":166,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":228},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":176,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":229},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":200,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":231}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":213},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":214},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":215},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":216},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":217},{"id":"WebSocketManager#gateway","longname":"WebSocketManager#gateway","name":"gateway","scope":"instance","kind":"member","description":"The gateway address for this WebSocket connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":46,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":218},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":59,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":220},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":221}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":233},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":235},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":236}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":234}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":24},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":26},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":28}}}} \ No newline at end of file +{"meta":{"version":9},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":120,"filename":"Client.js","path":"src/client"},"order":15}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":32,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#dataManager","longname":"Client#dataManager","name":"dataManager","scope":"instance","kind":"member","description":"The data manager of the Client","memberof":"Client","type":[[[["ClientDataManager"],""]]],"access":"private","meta":{"lineno":38,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":44,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":56,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":62,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":68,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":73,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":78,"filename":"Client.js","path":"src/client"},"order":10},{"id":"Client#token","longname":"Client#token","name":"token","scope":"instance","kind":"member","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":83,"filename":"Client.js","path":"src/client"},"order":11},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The ClientUser representing the logged in Client","memberof":"Client","type":[[[["ClientUser"],""]]],"nullable":true,"meta":{"lineno":88,"filename":"Client.js","path":"src/client"},"order":12},{"id":"Client#email","longname":"Client#email","name":"email","scope":"instance","kind":"member","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":13},{"id":"Client#password","longname":"Client#password","name":"password","scope":"instance","kind":"member","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":98,"filename":"Client.js","path":"src/client"},"order":14}],"events":[{"id":"Client#event:guildCreate","longname":"Client#event:guildCreate","name":"guildCreate","scope":"instance","kind":"event","description":"Emitted whenever the client joins a Guild.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the created guild.","name":"guild"}],"meta":{"lineno":24,"filename":"ClientDataManager.js","path":"src/client"},"order":16},{"id":"Client#event:guildMemberRolesUpdate","longname":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","scope":"instance","kind":"event","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the guild that the update affects","name":"guild"},{"type":[[["Array",".<"],["Role",">"]]],"description":"the roles before the update","name":"oldRoles"},{"type":[[[["Guild"],""]]],"description":"the roles after the update","name":"newRoles"}],"meta":{"lineno":91,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Client#event:channelUpdate","longname":"Client#event:channelUpdate","name":"channelUpdate","scope":"instance","kind":"event","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","params":[{"type":[[[["Channel"],""]]],"description":"the channel before the update","name":"oldChannel"},{"type":[[[["Channel"],""]]],"description":"the channel after the update","name":"newChannel"}],"meta":{"lineno":31,"filename":"ChannelUpdate.js","path":"src/client/actions"},"order":180},{"id":"Client#event:guildUnavailable","longname":"Client#event:guildUnavailable","name":"guildUnavailable","scope":"instance","kind":"event","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the guild that has become unavailable.","name":"guild"}],"meta":{"lineno":49,"filename":"GuildDelete.js","path":"src/client/actions"},"order":181},{"id":"Client#event:guildMemberRemove","longname":"Client#event:guildMemberRemove","name":"guildMemberRemove","scope":"instance","kind":"event","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the guild that the member has left.","name":"guild"},{"type":[[[["GuildMember"],""]]],"description":"the member that has left the guild.","name":"member"}],"meta":{"lineno":49,"filename":"GuildMemberRemove.js","path":"src/client/actions"},"order":182},{"id":"Client#event:guildRoleCreate","longname":"Client#event:guildRoleCreate","name":"guildRoleCreate","scope":"instance","kind":"event","description":"Emitted whenever a guild role is created.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the guild that the role was created in.","name":"guild"},{"type":[[[["Role"],""]]],"description":"the role that was created.","name":"role"}],"meta":{"lineno":32,"filename":"GuildRoleCreate.js","path":"src/client/actions"},"order":183},{"id":"Client#event:guildRoleDelete","longname":"Client#event:guildRoleDelete","name":"guildRoleDelete","scope":"instance","kind":"event","description":"Emitted whenever a guild role is deleted.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the guild that the role was deleted in.","name":"guild"},{"type":[[[["Role"],""]]],"description":"the role that was deleted.","name":"role"}],"meta":{"lineno":47,"filename":"GuildRoleDelete.js","path":"src/client/actions"},"order":184},{"id":"Client#event:guildRoleUpdated","longname":"Client#event:guildRoleUpdated","name":"guildRoleUpdated","scope":"instance","kind":"event","description":"Emitted whenever a guild role is updated.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the guild that the role was updated in.","name":"guild"},{"type":[[[["Role"],""]]],"description":"the role before the update.","name":"oldRole"},{"type":[[[["Role"],""]]],"description":"the role after the update.","name":"newRole"}],"meta":{"lineno":36,"filename":"GuildRoleUpdate.js","path":"src/client/actions"},"order":185},{"id":"Client#event:guildUpdate","longname":"Client#event:guildUpdate","name":"guildUpdate","scope":"instance","kind":"event","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the guild before the update.","name":"oldGuild"},{"type":[[[["Guild"],""]]],"description":"the guild after the update.","name":"newGuild"}],"meta":{"lineno":38,"filename":"GuildUpdate.js","path":"src/client/actions"},"order":186},{"id":"Client#event:messageUpdate","longname":"Client#event:messageUpdate","name":"messageUpdate","scope":"instance","kind":"event","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","params":[{"type":[[[["Message"],""]]],"description":"the message before the update.","name":"oldMessage"},{"type":[[[["Message"],""]]],"description":"the message after the update.","name":"newMessage"}],"meta":{"lineno":36,"filename":"MessageUpdate.js","path":"src/client/actions"},"order":187},{"id":"Client#event:userUpdate","longname":"Client#event:userUpdate","name":"userUpdate","scope":"instance","kind":"event","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","params":[{"type":[[[["ClientUser"],""]]],"description":"the client user before the update.","name":"oldClientUser"},{"type":[[[["ClientUser"],""]]],"description":"the client user after the update.","name":"newClientUser"}],"meta":{"lineno":36,"filename":"UserUpdate.js","path":"src/client/actions"},"order":188},{"id":"Client#event:channelCreate","longname":"Client#event:channelCreate","name":"channelCreate","scope":"instance","kind":"event","description":"Emitted whenever a Channel is created.","memberof":"Client","params":[{"type":[[[["Channel"],""]]],"description":"The channel that was created","name":"channel"}],"meta":{"lineno":20,"filename":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"order":199},{"id":"Client#event:channelDelete","longname":"Client#event:channelDelete","name":"channelDelete","scope":"instance","kind":"event","description":"Emitted whenever a Channel is deleted.","memberof":"Client","params":[{"type":[[[["Channel"],""]]],"description":"The channel that was deleted","name":"channel"}],"meta":{"lineno":20,"filename":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"order":200},{"id":"Client#event:guildBanAdd","longname":"Client#event:guildBanAdd","name":"guildBanAdd","scope":"instance","kind":"event","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"The guild that the ban occurred in","name":"guild"},{"type":[[[["User"],""]]],"description":"The user that was banned","name":"user"}],"meta":{"lineno":22,"filename":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"order":201},{"id":"Client#event:guildBanRemove","longname":"Client#event:guildBanRemove","name":"guildBanRemove","scope":"instance","kind":"event","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"The guild that the unban occurred in","name":"guild"},{"type":[[[["User"],""]]],"description":"The user that was unbanned","name":"user"}],"meta":{"lineno":23,"filename":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"order":202},{"id":"Client#event:guildDelete","longname":"Client#event:guildDelete","name":"guildDelete","scope":"instance","kind":"event","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"The guild that was deleted","name":"guild"}],"meta":{"lineno":19,"filename":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"order":203},{"id":"Client#event:guildMembersChunk","longname":"Client#event:guildMembersChunk","name":"guildMembersChunk","scope":"instance","kind":"event","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"The guild that the chunks relate to","name":"guild"},{"type":[[["Array",".<"],["GuildMember",">"]]],"description":"The members in the chunk","name":"members"}],"meta":{"lineno":25,"filename":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"order":204},{"id":"Client#event:message","longname":"Client#event:message","name":"message","scope":"instance","kind":"event","description":"Emitted whenever a message is created","memberof":"Client","params":[{"type":[[[["Message"],""]]],"description":"The created message","name":"message"}],"meta":{"lineno":19,"filename":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"order":205},{"id":"Client#event:messageDelete","longname":"Client#event:messageDelete","name":"messageDelete","scope":"instance","kind":"event","description":"Emitted whenever a message is deleted","memberof":"Client","params":[{"type":[[[["Message"],""]]],"description":"The deleted message","name":"message"}],"meta":{"lineno":19,"filename":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"order":206},{"id":"Client#event:presenceUpdate","longname":"Client#event:presenceUpdate","name":"presenceUpdate","scope":"instance","kind":"event","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","params":[{"type":[[[["User"],""]]],"description":"the user before the presence update","name":"oldUser"},{"type":[[[["User"],""]]],"description":"the user after the presence update","name":"newUser"}],"meta":{"lineno":66,"filename":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"order":207},{"id":"Client#event:guildMemberAvailable","longname":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","scope":"instance","kind":"event","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"The guild that the member became available in","name":"guild"},{"type":[[[["GuildMember"],""]]],"description":"the member that became available","name":"member"}],"meta":{"lineno":74,"filename":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"order":208},{"id":"Client#event:typingStart","longname":"Client#event:typingStart","name":"typingStart","scope":"instance","kind":"event","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","params":[{"type":[[[["Channel"],""]]],"description":"the channel the user started typing in","name":"channel"},{"type":[[[["User"],""]]],"description":"the user that started typing","name":"user"}],"meta":{"lineno":52,"filename":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"order":209},{"id":"Client#event:typingStop","longname":"Client#event:typingStop","name":"typingStop","scope":"instance","kind":"event","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","params":[{"type":[[[["Channel"],""]]],"description":"the channel the user stopped typing in","name":"channel"},{"type":[[[["User"],""]]],"description":"the user that stopped typing","name":"user"}],"meta":{"lineno":60,"filename":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"order":210},{"id":"Client#event:voiceStateUpdate","longname":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","scope":"instance","kind":"event","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","params":[{"type":[[[["GuildMember"],""]]],"description":"the member before the voice state update","name":"oldMember"},{"type":[[[["GuildMember"],""]]],"description":"the member before the voice state update","name":"newMember"}],"meta":{"lineno":34,"filename":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"order":211},{"id":"Client#event:ready","longname":"Client#event:ready","name":"ready","scope":"instance","kind":"event","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"lineno":185,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":230},{"id":"Client#event:reconnecting","longname":"Client#event:reconnecting","name":"reconnecting","scope":"instance","kind":"event","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"lineno":204,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":232}],"constructor":{"id":"Client()","longname":"Client","name":"Client","kind":"constructor","description":"Creates an instance of Client.","memberof":"Client","params":[{"type":{"names":["Object"]},"optional":true,"description":"options to pass to the client","name":"options"}],"order":1}},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":23},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":25},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":27},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":29}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":30},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":33},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":34}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":31},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":32}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":35},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":38}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":36},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":37}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":39},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":42},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":43},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":44},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":45},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":284},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":285},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":286},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":287},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":288}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":41},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":277},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":278},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":279},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":280},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":281},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":282},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":283}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":46},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":49},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":240},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":241},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":249}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":47},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":48},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":239},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":247},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":248}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":50},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":117,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":131,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":143,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":154,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":188,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":328,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":341,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":354,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":367,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":384,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":398,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":412,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":426,"filename":"Guild.js","path":"src/structures"},"order":85},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":440,"filename":"Guild.js","path":"src/structures"},"order":86},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":454,"filename":"Guild.js","path":"src/structures"},"order":87},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":468,"filename":"Guild.js","path":"src/structures"},"order":88},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":482,"filename":"Guild.js","path":"src/structures"},"order":89},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":496,"filename":"Guild.js","path":"src/structures"},"order":90}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":240,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":245,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":250,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":255,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":269,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":282,"filename":"Guild.js","path":"src/structures"},"order":77}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":91},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":99},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":100},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":101},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":102},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":103},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":276}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":274},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":275}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":104},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":120},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":121},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":245},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":246}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":117},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":118},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":119}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":122},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":137},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":138},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":139}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":134},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":135},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":136}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":140},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":141},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":142},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":143}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":144},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":157},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":158},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":159},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":160},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":161},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":162}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":153}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":163},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":243},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":244},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":256},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":257},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":258},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":259},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":260},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":261}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":242},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":255}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":164},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":172},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":173},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":174},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":237},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":238}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":169},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":170},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":171}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":175},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":179},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":268},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":269},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":270},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":271},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":272},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":273}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":176},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":177},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":178},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":262},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":263},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":264},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":265},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":266},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":267}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":189},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":193,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":194,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":190},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":191},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":192}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":195},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":198},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":292,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":293,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":196},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":197},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":289},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":290},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":291}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":212},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":54,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":219},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":76,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":222},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":223},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":98,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":224},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":115,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":225},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":226},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":142,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":227},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":166,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":228},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":176,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":229},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":200,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":231}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":213},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":214},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":215},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":216},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":217},{"id":"WebSocketManager#gateway","longname":"WebSocketManager#gateway","name":"gateway","scope":"instance","kind":"member","description":"The gateway address for this WebSocket connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":46,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":218},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":59,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":220},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":221}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":233},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":235},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":236}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":234}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":24},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":26},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":28}}}} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js index 76872f605..341afa20e 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -122,11 +122,15 @@ function clean() { } seenEvents[item.name] = true; const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; - const newTypes = []; - for (const name of item.type.names) { - newTypes.push(matchReturnName(name)); + if (item.params) { + for (const param of item.params) { + const newTypes = []; + for (const name of param.type.names) { + newTypes.push(matchReturnName(name)); + } + param.type = newTypes; + } } - item.type = newTypes; obj.events.push(item); } } From 30e6bbd7a48054caf638d665987a0584746b4d66 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 20 Aug 2016 16:19:33 +0100 Subject: [PATCH 121/324] docs --- docs/docs.json | 2 +- docs/gen/index.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index aaab02d5c..cec5cb4c6 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":9},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":120,"filename":"Client.js","path":"src/client"},"order":15}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":32,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#dataManager","longname":"Client#dataManager","name":"dataManager","scope":"instance","kind":"member","description":"The data manager of the Client","memberof":"Client","type":[[[["ClientDataManager"],""]]],"access":"private","meta":{"lineno":38,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":44,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":56,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":62,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":68,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":73,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":78,"filename":"Client.js","path":"src/client"},"order":10},{"id":"Client#token","longname":"Client#token","name":"token","scope":"instance","kind":"member","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":83,"filename":"Client.js","path":"src/client"},"order":11},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The ClientUser representing the logged in Client","memberof":"Client","type":[[[["ClientUser"],""]]],"nullable":true,"meta":{"lineno":88,"filename":"Client.js","path":"src/client"},"order":12},{"id":"Client#email","longname":"Client#email","name":"email","scope":"instance","kind":"member","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":13},{"id":"Client#password","longname":"Client#password","name":"password","scope":"instance","kind":"member","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":98,"filename":"Client.js","path":"src/client"},"order":14}],"events":[{"id":"Client#event:guildCreate","longname":"Client#event:guildCreate","name":"guildCreate","scope":"instance","kind":"event","description":"Emitted whenever the client joins a Guild.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the created guild.","name":"guild"}],"meta":{"lineno":24,"filename":"ClientDataManager.js","path":"src/client"},"order":16},{"id":"Client#event:guildMemberRolesUpdate","longname":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","scope":"instance","kind":"event","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the guild that the update affects","name":"guild"},{"type":[[["Array",".<"],["Role",">"]]],"description":"the roles before the update","name":"oldRoles"},{"type":[[[["Guild"],""]]],"description":"the roles after the update","name":"newRoles"}],"meta":{"lineno":91,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Client#event:channelUpdate","longname":"Client#event:channelUpdate","name":"channelUpdate","scope":"instance","kind":"event","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","params":[{"type":[[[["Channel"],""]]],"description":"the channel before the update","name":"oldChannel"},{"type":[[[["Channel"],""]]],"description":"the channel after the update","name":"newChannel"}],"meta":{"lineno":31,"filename":"ChannelUpdate.js","path":"src/client/actions"},"order":180},{"id":"Client#event:guildUnavailable","longname":"Client#event:guildUnavailable","name":"guildUnavailable","scope":"instance","kind":"event","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the guild that has become unavailable.","name":"guild"}],"meta":{"lineno":49,"filename":"GuildDelete.js","path":"src/client/actions"},"order":181},{"id":"Client#event:guildMemberRemove","longname":"Client#event:guildMemberRemove","name":"guildMemberRemove","scope":"instance","kind":"event","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the guild that the member has left.","name":"guild"},{"type":[[[["GuildMember"],""]]],"description":"the member that has left the guild.","name":"member"}],"meta":{"lineno":49,"filename":"GuildMemberRemove.js","path":"src/client/actions"},"order":182},{"id":"Client#event:guildRoleCreate","longname":"Client#event:guildRoleCreate","name":"guildRoleCreate","scope":"instance","kind":"event","description":"Emitted whenever a guild role is created.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the guild that the role was created in.","name":"guild"},{"type":[[[["Role"],""]]],"description":"the role that was created.","name":"role"}],"meta":{"lineno":32,"filename":"GuildRoleCreate.js","path":"src/client/actions"},"order":183},{"id":"Client#event:guildRoleDelete","longname":"Client#event:guildRoleDelete","name":"guildRoleDelete","scope":"instance","kind":"event","description":"Emitted whenever a guild role is deleted.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the guild that the role was deleted in.","name":"guild"},{"type":[[[["Role"],""]]],"description":"the role that was deleted.","name":"role"}],"meta":{"lineno":47,"filename":"GuildRoleDelete.js","path":"src/client/actions"},"order":184},{"id":"Client#event:guildRoleUpdated","longname":"Client#event:guildRoleUpdated","name":"guildRoleUpdated","scope":"instance","kind":"event","description":"Emitted whenever a guild role is updated.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the guild that the role was updated in.","name":"guild"},{"type":[[[["Role"],""]]],"description":"the role before the update.","name":"oldRole"},{"type":[[[["Role"],""]]],"description":"the role after the update.","name":"newRole"}],"meta":{"lineno":36,"filename":"GuildRoleUpdate.js","path":"src/client/actions"},"order":185},{"id":"Client#event:guildUpdate","longname":"Client#event:guildUpdate","name":"guildUpdate","scope":"instance","kind":"event","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"the guild before the update.","name":"oldGuild"},{"type":[[[["Guild"],""]]],"description":"the guild after the update.","name":"newGuild"}],"meta":{"lineno":38,"filename":"GuildUpdate.js","path":"src/client/actions"},"order":186},{"id":"Client#event:messageUpdate","longname":"Client#event:messageUpdate","name":"messageUpdate","scope":"instance","kind":"event","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","params":[{"type":[[[["Message"],""]]],"description":"the message before the update.","name":"oldMessage"},{"type":[[[["Message"],""]]],"description":"the message after the update.","name":"newMessage"}],"meta":{"lineno":36,"filename":"MessageUpdate.js","path":"src/client/actions"},"order":187},{"id":"Client#event:userUpdate","longname":"Client#event:userUpdate","name":"userUpdate","scope":"instance","kind":"event","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","params":[{"type":[[[["ClientUser"],""]]],"description":"the client user before the update.","name":"oldClientUser"},{"type":[[[["ClientUser"],""]]],"description":"the client user after the update.","name":"newClientUser"}],"meta":{"lineno":36,"filename":"UserUpdate.js","path":"src/client/actions"},"order":188},{"id":"Client#event:channelCreate","longname":"Client#event:channelCreate","name":"channelCreate","scope":"instance","kind":"event","description":"Emitted whenever a Channel is created.","memberof":"Client","params":[{"type":[[[["Channel"],""]]],"description":"The channel that was created","name":"channel"}],"meta":{"lineno":20,"filename":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"order":199},{"id":"Client#event:channelDelete","longname":"Client#event:channelDelete","name":"channelDelete","scope":"instance","kind":"event","description":"Emitted whenever a Channel is deleted.","memberof":"Client","params":[{"type":[[[["Channel"],""]]],"description":"The channel that was deleted","name":"channel"}],"meta":{"lineno":20,"filename":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"order":200},{"id":"Client#event:guildBanAdd","longname":"Client#event:guildBanAdd","name":"guildBanAdd","scope":"instance","kind":"event","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"The guild that the ban occurred in","name":"guild"},{"type":[[[["User"],""]]],"description":"The user that was banned","name":"user"}],"meta":{"lineno":22,"filename":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"order":201},{"id":"Client#event:guildBanRemove","longname":"Client#event:guildBanRemove","name":"guildBanRemove","scope":"instance","kind":"event","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"The guild that the unban occurred in","name":"guild"},{"type":[[[["User"],""]]],"description":"The user that was unbanned","name":"user"}],"meta":{"lineno":23,"filename":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"order":202},{"id":"Client#event:guildDelete","longname":"Client#event:guildDelete","name":"guildDelete","scope":"instance","kind":"event","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"The guild that was deleted","name":"guild"}],"meta":{"lineno":19,"filename":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"order":203},{"id":"Client#event:guildMembersChunk","longname":"Client#event:guildMembersChunk","name":"guildMembersChunk","scope":"instance","kind":"event","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"The guild that the chunks relate to","name":"guild"},{"type":[[["Array",".<"],["GuildMember",">"]]],"description":"The members in the chunk","name":"members"}],"meta":{"lineno":25,"filename":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"order":204},{"id":"Client#event:message","longname":"Client#event:message","name":"message","scope":"instance","kind":"event","description":"Emitted whenever a message is created","memberof":"Client","params":[{"type":[[[["Message"],""]]],"description":"The created message","name":"message"}],"meta":{"lineno":19,"filename":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"order":205},{"id":"Client#event:messageDelete","longname":"Client#event:messageDelete","name":"messageDelete","scope":"instance","kind":"event","description":"Emitted whenever a message is deleted","memberof":"Client","params":[{"type":[[[["Message"],""]]],"description":"The deleted message","name":"message"}],"meta":{"lineno":19,"filename":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"order":206},{"id":"Client#event:presenceUpdate","longname":"Client#event:presenceUpdate","name":"presenceUpdate","scope":"instance","kind":"event","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","params":[{"type":[[[["User"],""]]],"description":"the user before the presence update","name":"oldUser"},{"type":[[[["User"],""]]],"description":"the user after the presence update","name":"newUser"}],"meta":{"lineno":66,"filename":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"order":207},{"id":"Client#event:guildMemberAvailable","longname":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","scope":"instance","kind":"event","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","params":[{"type":[[[["Guild"],""]]],"description":"The guild that the member became available in","name":"guild"},{"type":[[[["GuildMember"],""]]],"description":"the member that became available","name":"member"}],"meta":{"lineno":74,"filename":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"order":208},{"id":"Client#event:typingStart","longname":"Client#event:typingStart","name":"typingStart","scope":"instance","kind":"event","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","params":[{"type":[[[["Channel"],""]]],"description":"the channel the user started typing in","name":"channel"},{"type":[[[["User"],""]]],"description":"the user that started typing","name":"user"}],"meta":{"lineno":52,"filename":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"order":209},{"id":"Client#event:typingStop","longname":"Client#event:typingStop","name":"typingStop","scope":"instance","kind":"event","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","params":[{"type":[[[["Channel"],""]]],"description":"the channel the user stopped typing in","name":"channel"},{"type":[[[["User"],""]]],"description":"the user that stopped typing","name":"user"}],"meta":{"lineno":60,"filename":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"order":210},{"id":"Client#event:voiceStateUpdate","longname":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","scope":"instance","kind":"event","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","params":[{"type":[[[["GuildMember"],""]]],"description":"the member before the voice state update","name":"oldMember"},{"type":[[[["GuildMember"],""]]],"description":"the member before the voice state update","name":"newMember"}],"meta":{"lineno":34,"filename":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"order":211},{"id":"Client#event:ready","longname":"Client#event:ready","name":"ready","scope":"instance","kind":"event","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"lineno":185,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":230},{"id":"Client#event:reconnecting","longname":"Client#event:reconnecting","name":"reconnecting","scope":"instance","kind":"event","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"lineno":204,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":232}],"constructor":{"id":"Client()","longname":"Client","name":"Client","kind":"constructor","description":"Creates an instance of Client.","memberof":"Client","params":[{"type":{"names":["Object"]},"optional":true,"description":"options to pass to the client","name":"options"}],"order":1}},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":23},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":25},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":27},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":29}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":30},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":33},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":34}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":31},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":32}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":35},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":38}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":36},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":37}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":39},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":42},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":43},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":44},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":45},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":284},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":285},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":286},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":287},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":288}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":41},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":277},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":278},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":279},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":280},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":281},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":282},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":283}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":46},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":49},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":240},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":241},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":249}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":47},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":48},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":239},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":247},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":248}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":50},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":117,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":131,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":143,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":154,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":188,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":328,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":341,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":354,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":367,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":384,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":398,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":412,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":426,"filename":"Guild.js","path":"src/structures"},"order":85},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":440,"filename":"Guild.js","path":"src/structures"},"order":86},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":454,"filename":"Guild.js","path":"src/structures"},"order":87},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":468,"filename":"Guild.js","path":"src/structures"},"order":88},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":482,"filename":"Guild.js","path":"src/structures"},"order":89},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":496,"filename":"Guild.js","path":"src/structures"},"order":90}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":240,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":245,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":250,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":255,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":269,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":282,"filename":"Guild.js","path":"src/structures"},"order":77}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":91},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":99},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":100},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":101},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":102},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":103},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":276}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":274},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":275}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":104},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":120},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":121},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":245},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":246}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":117},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":118},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":119}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":122},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":137},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":138},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":139}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":134},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":135},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":136}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":140},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":141},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":142},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":143}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":144},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":157},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":158},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":159},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":160},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":161},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":162}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":153}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":163},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":243},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":244},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":256},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":257},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":258},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":259},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":260},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":261}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":242},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":255}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":164},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":172},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":173},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":174},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":237},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":238}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":169},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":170},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":171}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":175},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":179},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":268},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":269},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":270},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":271},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":272},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":273}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":176},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":177},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":178},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":262},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":263},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":264},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":265},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":266},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":267}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":189},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":193,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":194,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":190},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":191},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":192}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":195},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":198},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":292,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":293,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":196},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":197},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":289},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":290},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":291}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":212},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":54,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":219},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":76,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":222},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":223},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":98,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":224},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":115,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":225},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":226},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":142,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":227},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":166,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":228},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":176,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":229},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":200,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":231}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":213},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":214},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":215},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":216},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":217},{"id":"WebSocketManager#gateway","longname":"WebSocketManager#gateway","name":"gateway","scope":"instance","kind":"member","description":"The gateway address for this WebSocket connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":46,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":218},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":59,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":220},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":221}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":233},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":235},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":236}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":234}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":24},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":26},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":28}}}} \ No newline at end of file +{"meta":{"version":10},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":120,"filename":"Client.js","path":"src/client"},"order":15}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":32,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#dataManager","longname":"Client#dataManager","name":"dataManager","scope":"instance","kind":"member","description":"The data manager of the Client","memberof":"Client","type":[[[["ClientDataManager"],""]]],"access":"private","meta":{"lineno":38,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":44,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":56,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":62,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":68,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":73,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":78,"filename":"Client.js","path":"src/client"},"order":10},{"id":"Client#token","longname":"Client#token","name":"token","scope":"instance","kind":"member","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":83,"filename":"Client.js","path":"src/client"},"order":11},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The ClientUser representing the logged in Client","memberof":"Client","type":[[[["ClientUser"],""]]],"nullable":true,"meta":{"lineno":88,"filename":"Client.js","path":"src/client"},"order":12},{"id":"Client#email","longname":"Client#email","name":"email","scope":"instance","kind":"member","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":13},{"id":"Client#password","longname":"Client#password","name":"password","scope":"instance","kind":"member","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":98,"filename":"Client.js","path":"src/client"},"order":14}],"events":[{"id":"Client#event:guildCreate","longname":"Client#event:guildCreate","name":"guildCreate","scope":"instance","kind":"event","description":"Emitted whenever the client joins a Guild.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the created guild.","name":"guild"}]}],"meta":{"lineno":24,"filename":"ClientDataManager.js","path":"src/client"},"order":16},{"id":"Client#event:guildMemberRolesUpdate","longname":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","scope":"instance","kind":"event","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the guild that the update affects","name":"guild"},{"type":[[["Array",".<"],["Role",">"]]],"description":"the roles before the update","name":"oldRoles"},{"type":[[[["Guild"],""]]],"description":"the roles after the update","name":"newRoles"}]}],"meta":{"lineno":91,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Client#event:channelUpdate","longname":"Client#event:channelUpdate","name":"channelUpdate","scope":"instance","kind":"event","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","params":[{"type":[{"type":[[[["Channel"],""]]],"description":"the channel before the update","name":"oldChannel"},{"type":[[[["Channel"],""]]],"description":"the channel after the update","name":"newChannel"}]}],"meta":{"lineno":31,"filename":"ChannelUpdate.js","path":"src/client/actions"},"order":180},{"id":"Client#event:guildUnavailable","longname":"Client#event:guildUnavailable","name":"guildUnavailable","scope":"instance","kind":"event","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the guild that has become unavailable.","name":"guild"}]}],"meta":{"lineno":49,"filename":"GuildDelete.js","path":"src/client/actions"},"order":181},{"id":"Client#event:guildMemberRemove","longname":"Client#event:guildMemberRemove","name":"guildMemberRemove","scope":"instance","kind":"event","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the guild that the member has left.","name":"guild"},{"type":[[[["GuildMember"],""]]],"description":"the member that has left the guild.","name":"member"}]}],"meta":{"lineno":49,"filename":"GuildMemberRemove.js","path":"src/client/actions"},"order":182},{"id":"Client#event:guildRoleCreate","longname":"Client#event:guildRoleCreate","name":"guildRoleCreate","scope":"instance","kind":"event","description":"Emitted whenever a guild role is created.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the guild that the role was created in.","name":"guild"},{"type":[[[["Role"],""]]],"description":"the role that was created.","name":"role"}]}],"meta":{"lineno":32,"filename":"GuildRoleCreate.js","path":"src/client/actions"},"order":183},{"id":"Client#event:guildRoleDelete","longname":"Client#event:guildRoleDelete","name":"guildRoleDelete","scope":"instance","kind":"event","description":"Emitted whenever a guild role is deleted.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the guild that the role was deleted in.","name":"guild"},{"type":[[[["Role"],""]]],"description":"the role that was deleted.","name":"role"}]}],"meta":{"lineno":47,"filename":"GuildRoleDelete.js","path":"src/client/actions"},"order":184},{"id":"Client#event:guildRoleUpdated","longname":"Client#event:guildRoleUpdated","name":"guildRoleUpdated","scope":"instance","kind":"event","description":"Emitted whenever a guild role is updated.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the guild that the role was updated in.","name":"guild"},{"type":[[[["Role"],""]]],"description":"the role before the update.","name":"oldRole"},{"type":[[[["Role"],""]]],"description":"the role after the update.","name":"newRole"}]}],"meta":{"lineno":36,"filename":"GuildRoleUpdate.js","path":"src/client/actions"},"order":185},{"id":"Client#event:guildUpdate","longname":"Client#event:guildUpdate","name":"guildUpdate","scope":"instance","kind":"event","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the guild before the update.","name":"oldGuild"},{"type":[[[["Guild"],""]]],"description":"the guild after the update.","name":"newGuild"}]}],"meta":{"lineno":38,"filename":"GuildUpdate.js","path":"src/client/actions"},"order":186},{"id":"Client#event:messageUpdate","longname":"Client#event:messageUpdate","name":"messageUpdate","scope":"instance","kind":"event","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","params":[{"type":[{"type":[[[["Message"],""]]],"description":"the message before the update.","name":"oldMessage"},{"type":[[[["Message"],""]]],"description":"the message after the update.","name":"newMessage"}]}],"meta":{"lineno":36,"filename":"MessageUpdate.js","path":"src/client/actions"},"order":187},{"id":"Client#event:userUpdate","longname":"Client#event:userUpdate","name":"userUpdate","scope":"instance","kind":"event","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","params":[{"type":[{"type":[[[["ClientUser"],""]]],"description":"the client user before the update.","name":"oldClientUser"},{"type":[[[["ClientUser"],""]]],"description":"the client user after the update.","name":"newClientUser"}]}],"meta":{"lineno":36,"filename":"UserUpdate.js","path":"src/client/actions"},"order":188},{"id":"Client#event:channelCreate","longname":"Client#event:channelCreate","name":"channelCreate","scope":"instance","kind":"event","description":"Emitted whenever a Channel is created.","memberof":"Client","params":[{"type":[{"type":[[[["Channel"],""]]],"description":"The channel that was created","name":"channel"}]}],"meta":{"lineno":20,"filename":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"order":199},{"id":"Client#event:channelDelete","longname":"Client#event:channelDelete","name":"channelDelete","scope":"instance","kind":"event","description":"Emitted whenever a Channel is deleted.","memberof":"Client","params":[{"type":[{"type":[[[["Channel"],""]]],"description":"The channel that was deleted","name":"channel"}]}],"meta":{"lineno":20,"filename":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"order":200},{"id":"Client#event:guildBanAdd","longname":"Client#event:guildBanAdd","name":"guildBanAdd","scope":"instance","kind":"event","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"The guild that the ban occurred in","name":"guild"},{"type":[[[["User"],""]]],"description":"The user that was banned","name":"user"}]}],"meta":{"lineno":22,"filename":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"order":201},{"id":"Client#event:guildBanRemove","longname":"Client#event:guildBanRemove","name":"guildBanRemove","scope":"instance","kind":"event","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"The guild that the unban occurred in","name":"guild"},{"type":[[[["User"],""]]],"description":"The user that was unbanned","name":"user"}]}],"meta":{"lineno":23,"filename":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"order":202},{"id":"Client#event:guildDelete","longname":"Client#event:guildDelete","name":"guildDelete","scope":"instance","kind":"event","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"The guild that was deleted","name":"guild"}]}],"meta":{"lineno":19,"filename":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"order":203},{"id":"Client#event:guildMembersChunk","longname":"Client#event:guildMembersChunk","name":"guildMembersChunk","scope":"instance","kind":"event","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"The guild that the chunks relate to","name":"guild"},{"type":[[["Array",".<"],["GuildMember",">"]]],"description":"The members in the chunk","name":"members"}]}],"meta":{"lineno":25,"filename":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"order":204},{"id":"Client#event:message","longname":"Client#event:message","name":"message","scope":"instance","kind":"event","description":"Emitted whenever a message is created","memberof":"Client","params":[{"type":[{"type":[[[["Message"],""]]],"description":"The created message","name":"message"}]}],"meta":{"lineno":19,"filename":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"order":205},{"id":"Client#event:messageDelete","longname":"Client#event:messageDelete","name":"messageDelete","scope":"instance","kind":"event","description":"Emitted whenever a message is deleted","memberof":"Client","params":[{"type":[{"type":[[[["Message"],""]]],"description":"The deleted message","name":"message"}]}],"meta":{"lineno":19,"filename":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"order":206},{"id":"Client#event:presenceUpdate","longname":"Client#event:presenceUpdate","name":"presenceUpdate","scope":"instance","kind":"event","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","params":[{"type":[{"type":[[[["User"],""]]],"description":"the user before the presence update","name":"oldUser"},{"type":[[[["User"],""]]],"description":"the user after the presence update","name":"newUser"}]}],"meta":{"lineno":66,"filename":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"order":207},{"id":"Client#event:guildMemberAvailable","longname":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","scope":"instance","kind":"event","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"The guild that the member became available in","name":"guild"},{"type":[[[["GuildMember"],""]]],"description":"the member that became available","name":"member"}]}],"meta":{"lineno":74,"filename":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"order":208},{"id":"Client#event:typingStart","longname":"Client#event:typingStart","name":"typingStart","scope":"instance","kind":"event","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","params":[{"type":[{"type":[[[["Channel"],""]]],"description":"the channel the user started typing in","name":"channel"},{"type":[[[["User"],""]]],"description":"the user that started typing","name":"user"}]}],"meta":{"lineno":52,"filename":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"order":209},{"id":"Client#event:typingStop","longname":"Client#event:typingStop","name":"typingStop","scope":"instance","kind":"event","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","params":[{"type":[{"type":[[[["Channel"],""]]],"description":"the channel the user stopped typing in","name":"channel"},{"type":[[[["User"],""]]],"description":"the user that stopped typing","name":"user"}]}],"meta":{"lineno":60,"filename":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"order":210},{"id":"Client#event:voiceStateUpdate","longname":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","scope":"instance","kind":"event","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","params":[{"type":[{"type":[[[["GuildMember"],""]]],"description":"the member before the voice state update","name":"oldMember"},{"type":[[[["GuildMember"],""]]],"description":"the member before the voice state update","name":"newMember"}]}],"meta":{"lineno":34,"filename":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"order":211},{"id":"Client#event:ready","longname":"Client#event:ready","name":"ready","scope":"instance","kind":"event","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"lineno":185,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":230,"params":[{}]},{"id":"Client#event:reconnecting","longname":"Client#event:reconnecting","name":"reconnecting","scope":"instance","kind":"event","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"lineno":204,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":232,"params":[{}]}],"constructor":{"id":"Client()","longname":"Client","name":"Client","kind":"constructor","description":"Creates an instance of Client.","memberof":"Client","params":[{"type":{"names":["Object"]},"optional":true,"description":"options to pass to the client","name":"options"}],"order":1}},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":23},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":25},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":27},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":29}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":30},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":33},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":34}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":31},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":32}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":35},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":38}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":36},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":37}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":39},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":42},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":43},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":44},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":45},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":284},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":285},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":286},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":287},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":288}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":41},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":277},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":278},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":279},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":280},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":281},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":282},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":283}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":46},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":49},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":240},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":241},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":249}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":47},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":48},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":239},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":247},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":248}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":50},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":117,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":131,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":143,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":154,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":188,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":328,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":341,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":354,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":367,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":384,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":398,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":412,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":426,"filename":"Guild.js","path":"src/structures"},"order":85},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":440,"filename":"Guild.js","path":"src/structures"},"order":86},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":454,"filename":"Guild.js","path":"src/structures"},"order":87},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":468,"filename":"Guild.js","path":"src/structures"},"order":88},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":482,"filename":"Guild.js","path":"src/structures"},"order":89},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":496,"filename":"Guild.js","path":"src/structures"},"order":90}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":240,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":245,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":250,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":255,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":269,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":282,"filename":"Guild.js","path":"src/structures"},"order":77}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":91},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":99},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":100},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":101},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":102},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":103},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":276}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":274},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":275}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":104},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":120},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":121},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":245},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":246}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":117},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":118},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":119}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":122},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":137},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":138},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":139}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":134},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":135},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":136}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":140},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":141},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":142},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":143}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":144},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":157},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":158},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":159},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":160},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":161},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":162}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":153}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":163},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":243},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":244},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":256},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":257},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":258},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":259},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":260},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":261}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":242},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":255}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":164},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":172},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":173},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":174},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":237},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":238}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":169},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":170},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":171}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":175},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":179},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":268},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":269},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":270},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":271},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":272},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":273}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":176},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":177},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":178},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":262},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":263},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":264},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":265},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":266},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":267}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":189},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":193,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":194,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":190},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":191},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":192}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":195},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":198},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":292,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":293,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":196},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":197},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":289},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":290},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":291}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":212},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":54,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":219},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":76,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":222},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":223},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":98,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":224},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":115,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":225},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":226},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":142,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":227},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":166,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":228},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":176,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":229},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":200,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":231}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":213},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":214},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":215},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":216},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":217},{"id":"WebSocketManager#gateway","longname":"WebSocketManager#gateway","name":"gateway","scope":"instance","kind":"member","description":"The gateway address for this WebSocket connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":46,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":218},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":59,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":220},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":221}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":233},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":235},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":236}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":234}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":24},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":26},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":28}}}} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js index 341afa20e..53881c5c1 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -4,7 +4,7 @@ let parse; const customDocs = require('../custom/index'); -const GEN_VERSION = 9; +const GEN_VERSION = 10; try { fs = require('fs-extra'); @@ -131,6 +131,11 @@ function clean() { param.type = newTypes; } } + item.params = [ + { + type: item.params, + }, + ]; obj.events.push(item); } } From 985681f1f6e25a5fc1b0a45cafa524a9f9de8ca7 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 21 Aug 2016 17:26:35 +0100 Subject: [PATCH 122/324] change doc gen --- docs/docs.json | 2 +- docs/gen/index.js | 166 ------------------ docs/generator/config.json | 4 + docs/generator/doc-scanner.js | 25 +++ docs/generator/documentation.js | 111 ++++++++++++ docs/generator/generator.js | 26 +++ docs/generator/types/DocumentedClass.js | 83 +++++++++ docs/generator/types/DocumentedConstructor.js | 32 ++++ docs/generator/types/DocumentedEvent.js | 72 ++++++++ docs/generator/types/DocumentedFunction.js | 91 ++++++++++ docs/generator/types/DocumentedInterface.js | 32 ++++ docs/generator/types/DocumentedItem.js | 17 ++ docs/generator/types/DocumentedItemMeta.js | 29 +++ docs/generator/types/DocumentedMember.js | 47 +++++ docs/generator/types/DocumentedParam.js | 35 ++++ docs/generator/types/DocumentedTypeDef.js | 44 +++++ docs/generator/types/DocumentedVarType.js | 47 +++++ package.json | 2 +- 18 files changed, 697 insertions(+), 168 deletions(-) delete mode 100644 docs/gen/index.js create mode 100644 docs/generator/config.json create mode 100644 docs/generator/doc-scanner.js create mode 100644 docs/generator/documentation.js create mode 100644 docs/generator/generator.js create mode 100644 docs/generator/types/DocumentedClass.js create mode 100644 docs/generator/types/DocumentedConstructor.js create mode 100644 docs/generator/types/DocumentedEvent.js create mode 100644 docs/generator/types/DocumentedFunction.js create mode 100644 docs/generator/types/DocumentedInterface.js create mode 100644 docs/generator/types/DocumentedItem.js create mode 100644 docs/generator/types/DocumentedItemMeta.js create mode 100644 docs/generator/types/DocumentedMember.js create mode 100644 docs/generator/types/DocumentedParam.js create mode 100644 docs/generator/types/DocumentedTypeDef.js create mode 100644 docs/generator/types/DocumentedVarType.js diff --git a/docs/docs.json b/docs/docs.json index cec5cb4c6..715a3f683 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":10},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["String"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"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);"],"returns":[[["Promise",".<"],["String",">"]]],"meta":{"lineno":120,"filename":"Client.js","path":"src/client"},"order":15}],"properties":[{"id":"Client#rest","longname":"Client#rest","name":"rest","scope":"instance","kind":"member","description":"The REST manager of the client","memberof":"Client","type":[[[["RESTManager"],""]]],"access":"private","meta":{"lineno":32,"filename":"Client.js","path":"src/client"},"order":2},{"id":"Client#dataManager","longname":"Client#dataManager","name":"dataManager","scope":"instance","kind":"member","description":"The data manager of the Client","memberof":"Client","type":[[[["ClientDataManager"],""]]],"access":"private","meta":{"lineno":38,"filename":"Client.js","path":"src/client"},"order":3},{"id":"Client#manager","longname":"Client#manager","name":"manager","scope":"instance","kind":"member","description":"The manager of the Client","memberof":"Client","type":[[[["ClientManager"],""]]],"access":"private","meta":{"lineno":44,"filename":"Client.js","path":"src/client"},"order":4},{"id":"Client#ws","longname":"Client#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket Manager of the Client","memberof":"Client","type":[[[["WebSocketManager"],""]]],"access":"private","meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":5},{"id":"Client#resolver","longname":"Client#resolver","name":"resolver","scope":"instance","kind":"member","description":"The Data Resolver of the Client","memberof":"Client","type":[[[["ClientDataResolver"],""]]],"access":"private","meta":{"lineno":56,"filename":"Client.js","path":"src/client"},"order":6},{"id":"Client#actions","longname":"Client#actions","name":"actions","scope":"instance","kind":"member","description":"The Action Manager of the Client","memberof":"Client","type":[[[["ActionsManager"],""]]],"access":"private","meta":{"lineno":62,"filename":"Client.js","path":"src/client"},"order":7},{"id":"Client#users","longname":"Client#users","name":"users","scope":"instance","kind":"member","description":"A map of the Client's stored users","memberof":"Client","type":[[["Map",".<"],["String",", "],["User",">"]]],"meta":{"lineno":68,"filename":"Client.js","path":"src/client"},"order":8},{"id":"Client#guilds","longname":"Client#guilds","name":"guilds","scope":"instance","kind":"member","description":"A map of the Client's stored guilds","memberof":"Client","type":[[["Map",".<"],["String",", "],["Guild",">"]]],"meta":{"lineno":73,"filename":"Client.js","path":"src/client"},"order":9},{"id":"Client#channels","longname":"Client#channels","name":"channels","scope":"instance","kind":"member","description":"A map of the Client's stored channels","memberof":"Client","type":[[["Map",".<"],["String",", "],["Channel",">"]]],"meta":{"lineno":78,"filename":"Client.js","path":"src/client"},"order":10},{"id":"Client#token","longname":"Client#token","name":"token","scope":"instance","kind":"member","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":83,"filename":"Client.js","path":"src/client"},"order":11},{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The ClientUser representing the logged in Client","memberof":"Client","type":[[[["ClientUser"],""]]],"nullable":true,"meta":{"lineno":88,"filename":"Client.js","path":"src/client"},"order":12},{"id":"Client#email","longname":"Client#email","name":"email","scope":"instance","kind":"member","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":93,"filename":"Client.js","path":"src/client"},"order":13},{"id":"Client#password","longname":"Client#password","name":"password","scope":"instance","kind":"member","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":98,"filename":"Client.js","path":"src/client"},"order":14}],"events":[{"id":"Client#event:guildCreate","longname":"Client#event:guildCreate","name":"guildCreate","scope":"instance","kind":"event","description":"Emitted whenever the client joins a Guild.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the created guild.","name":"guild"}]}],"meta":{"lineno":24,"filename":"ClientDataManager.js","path":"src/client"},"order":16},{"id":"Client#event:guildMemberRolesUpdate","longname":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","scope":"instance","kind":"event","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the guild that the update affects","name":"guild"},{"type":[[["Array",".<"],["Role",">"]]],"description":"the roles before the update","name":"oldRoles"},{"type":[[[["Guild"],""]]],"description":"the roles after the update","name":"newRoles"}]}],"meta":{"lineno":91,"filename":"Guild.js","path":"src/structures"},"order":57},{"id":"Client#event:channelUpdate","longname":"Client#event:channelUpdate","name":"channelUpdate","scope":"instance","kind":"event","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","params":[{"type":[{"type":[[[["Channel"],""]]],"description":"the channel before the update","name":"oldChannel"},{"type":[[[["Channel"],""]]],"description":"the channel after the update","name":"newChannel"}]}],"meta":{"lineno":31,"filename":"ChannelUpdate.js","path":"src/client/actions"},"order":180},{"id":"Client#event:guildUnavailable","longname":"Client#event:guildUnavailable","name":"guildUnavailable","scope":"instance","kind":"event","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the guild that has become unavailable.","name":"guild"}]}],"meta":{"lineno":49,"filename":"GuildDelete.js","path":"src/client/actions"},"order":181},{"id":"Client#event:guildMemberRemove","longname":"Client#event:guildMemberRemove","name":"guildMemberRemove","scope":"instance","kind":"event","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the guild that the member has left.","name":"guild"},{"type":[[[["GuildMember"],""]]],"description":"the member that has left the guild.","name":"member"}]}],"meta":{"lineno":49,"filename":"GuildMemberRemove.js","path":"src/client/actions"},"order":182},{"id":"Client#event:guildRoleCreate","longname":"Client#event:guildRoleCreate","name":"guildRoleCreate","scope":"instance","kind":"event","description":"Emitted whenever a guild role is created.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the guild that the role was created in.","name":"guild"},{"type":[[[["Role"],""]]],"description":"the role that was created.","name":"role"}]}],"meta":{"lineno":32,"filename":"GuildRoleCreate.js","path":"src/client/actions"},"order":183},{"id":"Client#event:guildRoleDelete","longname":"Client#event:guildRoleDelete","name":"guildRoleDelete","scope":"instance","kind":"event","description":"Emitted whenever a guild role is deleted.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the guild that the role was deleted in.","name":"guild"},{"type":[[[["Role"],""]]],"description":"the role that was deleted.","name":"role"}]}],"meta":{"lineno":47,"filename":"GuildRoleDelete.js","path":"src/client/actions"},"order":184},{"id":"Client#event:guildRoleUpdated","longname":"Client#event:guildRoleUpdated","name":"guildRoleUpdated","scope":"instance","kind":"event","description":"Emitted whenever a guild role is updated.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the guild that the role was updated in.","name":"guild"},{"type":[[[["Role"],""]]],"description":"the role before the update.","name":"oldRole"},{"type":[[[["Role"],""]]],"description":"the role after the update.","name":"newRole"}]}],"meta":{"lineno":36,"filename":"GuildRoleUpdate.js","path":"src/client/actions"},"order":185},{"id":"Client#event:guildUpdate","longname":"Client#event:guildUpdate","name":"guildUpdate","scope":"instance","kind":"event","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"the guild before the update.","name":"oldGuild"},{"type":[[[["Guild"],""]]],"description":"the guild after the update.","name":"newGuild"}]}],"meta":{"lineno":38,"filename":"GuildUpdate.js","path":"src/client/actions"},"order":186},{"id":"Client#event:messageUpdate","longname":"Client#event:messageUpdate","name":"messageUpdate","scope":"instance","kind":"event","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","params":[{"type":[{"type":[[[["Message"],""]]],"description":"the message before the update.","name":"oldMessage"},{"type":[[[["Message"],""]]],"description":"the message after the update.","name":"newMessage"}]}],"meta":{"lineno":36,"filename":"MessageUpdate.js","path":"src/client/actions"},"order":187},{"id":"Client#event:userUpdate","longname":"Client#event:userUpdate","name":"userUpdate","scope":"instance","kind":"event","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","params":[{"type":[{"type":[[[["ClientUser"],""]]],"description":"the client user before the update.","name":"oldClientUser"},{"type":[[[["ClientUser"],""]]],"description":"the client user after the update.","name":"newClientUser"}]}],"meta":{"lineno":36,"filename":"UserUpdate.js","path":"src/client/actions"},"order":188},{"id":"Client#event:channelCreate","longname":"Client#event:channelCreate","name":"channelCreate","scope":"instance","kind":"event","description":"Emitted whenever a Channel is created.","memberof":"Client","params":[{"type":[{"type":[[[["Channel"],""]]],"description":"The channel that was created","name":"channel"}]}],"meta":{"lineno":20,"filename":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"order":199},{"id":"Client#event:channelDelete","longname":"Client#event:channelDelete","name":"channelDelete","scope":"instance","kind":"event","description":"Emitted whenever a Channel is deleted.","memberof":"Client","params":[{"type":[{"type":[[[["Channel"],""]]],"description":"The channel that was deleted","name":"channel"}]}],"meta":{"lineno":20,"filename":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"order":200},{"id":"Client#event:guildBanAdd","longname":"Client#event:guildBanAdd","name":"guildBanAdd","scope":"instance","kind":"event","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"The guild that the ban occurred in","name":"guild"},{"type":[[[["User"],""]]],"description":"The user that was banned","name":"user"}]}],"meta":{"lineno":22,"filename":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"order":201},{"id":"Client#event:guildBanRemove","longname":"Client#event:guildBanRemove","name":"guildBanRemove","scope":"instance","kind":"event","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"The guild that the unban occurred in","name":"guild"},{"type":[[[["User"],""]]],"description":"The user that was unbanned","name":"user"}]}],"meta":{"lineno":23,"filename":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"order":202},{"id":"Client#event:guildDelete","longname":"Client#event:guildDelete","name":"guildDelete","scope":"instance","kind":"event","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"The guild that was deleted","name":"guild"}]}],"meta":{"lineno":19,"filename":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"order":203},{"id":"Client#event:guildMembersChunk","longname":"Client#event:guildMembersChunk","name":"guildMembersChunk","scope":"instance","kind":"event","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"The guild that the chunks relate to","name":"guild"},{"type":[[["Array",".<"],["GuildMember",">"]]],"description":"The members in the chunk","name":"members"}]}],"meta":{"lineno":25,"filename":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"order":204},{"id":"Client#event:message","longname":"Client#event:message","name":"message","scope":"instance","kind":"event","description":"Emitted whenever a message is created","memberof":"Client","params":[{"type":[{"type":[[[["Message"],""]]],"description":"The created message","name":"message"}]}],"meta":{"lineno":19,"filename":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"order":205},{"id":"Client#event:messageDelete","longname":"Client#event:messageDelete","name":"messageDelete","scope":"instance","kind":"event","description":"Emitted whenever a message is deleted","memberof":"Client","params":[{"type":[{"type":[[[["Message"],""]]],"description":"The deleted message","name":"message"}]}],"meta":{"lineno":19,"filename":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"order":206},{"id":"Client#event:presenceUpdate","longname":"Client#event:presenceUpdate","name":"presenceUpdate","scope":"instance","kind":"event","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","params":[{"type":[{"type":[[[["User"],""]]],"description":"the user before the presence update","name":"oldUser"},{"type":[[[["User"],""]]],"description":"the user after the presence update","name":"newUser"}]}],"meta":{"lineno":66,"filename":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"order":207},{"id":"Client#event:guildMemberAvailable","longname":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","scope":"instance","kind":"event","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","params":[{"type":[{"type":[[[["Guild"],""]]],"description":"The guild that the member became available in","name":"guild"},{"type":[[[["GuildMember"],""]]],"description":"the member that became available","name":"member"}]}],"meta":{"lineno":74,"filename":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"order":208},{"id":"Client#event:typingStart","longname":"Client#event:typingStart","name":"typingStart","scope":"instance","kind":"event","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","params":[{"type":[{"type":[[[["Channel"],""]]],"description":"the channel the user started typing in","name":"channel"},{"type":[[[["User"],""]]],"description":"the user that started typing","name":"user"}]}],"meta":{"lineno":52,"filename":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"order":209},{"id":"Client#event:typingStop","longname":"Client#event:typingStop","name":"typingStop","scope":"instance","kind":"event","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","params":[{"type":[{"type":[[[["Channel"],""]]],"description":"the channel the user stopped typing in","name":"channel"},{"type":[[[["User"],""]]],"description":"the user that stopped typing","name":"user"}]}],"meta":{"lineno":60,"filename":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"order":210},{"id":"Client#event:voiceStateUpdate","longname":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","scope":"instance","kind":"event","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","params":[{"type":[{"type":[[[["GuildMember"],""]]],"description":"the member before the voice state update","name":"oldMember"},{"type":[[[["GuildMember"],""]]],"description":"the member before the voice state update","name":"newMember"}]}],"meta":{"lineno":34,"filename":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"order":211},{"id":"Client#event:ready","longname":"Client#event:ready","name":"ready","scope":"instance","kind":"event","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"lineno":185,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":230,"params":[{}]},{"id":"Client#event:reconnecting","longname":"Client#event:reconnecting","name":"reconnecting","scope":"instance","kind":"event","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"lineno":204,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":232,"params":[{}]}],"constructor":{"id":"Client()","longname":"Client","name":"Client","kind":"constructor","description":"Creates an instance of Client.","memberof":"Client","params":[{"type":{"names":["Object"]},"optional":true,"description":"options to pass to the client","name":"options"}],"order":1}},"ClientDataResolver":{"meta":{"id":"ClientDataResolver","longname":"ClientDataResolver","name":"ClientDataResolver","scope":"global","kind":"class","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","meta":{"lineno":18,"filename":"ClientDataResolver.js","path":"src/client"},"order":17},"functions":[{"id":"ClientDataResolver#resolveUser","longname":"ClientDataResolver#resolveUser","name":"resolveUser","scope":"instance","kind":"function","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","params":[{"type":{"names":["UserResolvable"]},"description":"the UserResolvable to identify","name":"user"}],"returns":[[[["User"],""]]],"meta":{"lineno":37,"filename":"ClientDataResolver.js","path":"src/client"},"order":19},{"id":"ClientDataResolver#resolveGuild","longname":"ClientDataResolver#resolveGuild","name":"resolveGuild","scope":"instance","kind":"function","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the GuildResolvable to identify","name":"guild"}],"returns":[[[["Guild"],""]]],"meta":{"lineno":62,"filename":"ClientDataResolver.js","path":"src/client"},"order":21},{"id":"ClientDataResolver#resolveGuildMember","longname":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","scope":"instance","kind":"function","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","params":[{"type":{"names":["GuildResolvable"]},"description":"the guild that the member is part of","name":"guild"},{"type":{"names":["UserResolvable"]},"description":"the user that is part of the guild","name":"user"}],"returns":[[[["GuildMember"],""]]],"meta":{"lineno":81,"filename":"ClientDataResolver.js","path":"src/client"},"order":23},{"id":"ClientDataResolver#resolveBase64","longname":"ClientDataResolver#resolveBase64","name":"resolveBase64","scope":"instance","kind":"function","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","params":[{"type":{"names":["Base64Resolvable"]},"description":"the base 64 resolvable you want to resolve","name":"dataResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":110,"filename":"ClientDataResolver.js","path":"src/client"},"order":25},{"id":"ClientDataResolver#resolveChannel","longname":"ClientDataResolver#resolveChannel","name":"resolveChannel","scope":"instance","kind":"function","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","params":[{"type":{"names":["ChannelResolvable"]},"description":"the channel resolvable to resolve","name":"channelResolvable"}],"returns":[[[["Channel"],""]]],"meta":{"lineno":130,"filename":"ClientDataResolver.js","path":"src/client"},"order":27},{"id":"ClientDataResolver#resolveString","longname":"ClientDataResolver#resolveString","name":"resolveString","scope":"instance","kind":"function","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","params":[{"type":{"names":["StringResolvable"]},"description":"the string resolvable to resolve","name":"stringResolvable"}],"returns":[[[["String"],""]]],"meta":{"lineno":155,"filename":"ClientDataResolver.js","path":"src/client"},"order":29}],"properties":[],"events":[]},"ClientManager":{"meta":{"id":"ClientManager","longname":"ClientManager","name":"ClientManager","scope":"global","kind":"class","description":"Manages the State and Background Tasks of the Client","access":"private","meta":{"lineno":7,"filename":"ClientManager.js","path":"src/client"},"order":30},"functions":[{"id":"ClientManager#connectToWebSocket","longname":"ClientManager#connectToWebSocket","name":"connectToWebSocket","scope":"instance","kind":"function","description":"Connects the Client to the WebSocket","memberof":"ClientManager","params":[{"type":{"names":["String"]},"description":"the authorization token","name":"token"},{"type":{"names":["function"]},"description":"function to run when connection is successful","name":"resolve"},{"type":{"names":["function"]},"description":"function to run when connection fails","name":"reject"}],"returns":[[[["null"],""]]],"meta":{"lineno":29,"filename":"ClientManager.js","path":"src/client"},"order":33},{"id":"ClientManager#setupKeepAlive","longname":"ClientManager#setupKeepAlive","name":"setupKeepAlive","scope":"instance","kind":"function","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","params":[{"type":{"names":["Number"]},"description":"the interval in milliseconds at which heartbeat packets should be sent","name":"time"}],"returns":[[[["null"],""]]],"meta":{"lineno":46,"filename":"ClientManager.js","path":"src/client"},"order":34}],"properties":[{"id":"ClientManager#client","longname":"ClientManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":[[[["Client"],""]]],"meta":{"lineno":14,"filename":"ClientManager.js","path":"src/client"},"order":31},{"id":"ClientManager#heartbeatInterval","longname":"ClientManager#heartbeatInterval","name":"heartbeatInterval","scope":"instance","kind":"member","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":19,"filename":"ClientManager.js","path":"src/client"},"order":32}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":35},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":38}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":36},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":37}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":39},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":42},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":43},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","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","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":44},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["ClientUser",">"]]],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":45},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":284},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":285},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":286},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":287},{"id":"ClientUser#sendTTSMessage","longname":"ClientUser#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","inherits":"User#sendTTSMessage","inherited":true,"implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":288}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":40},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":41},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":277},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":278},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":279},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":280},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":281},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":282},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":283}],"events":[]},"DMChannel":{"meta":{"id":"DMChannel","longname":"DMChannel","name":"DMChannel","scope":"global","kind":"class","augments":["Channel"],"implements":["TextBasedChannel"],"description":"Represents a Direct Message Channel between two users.","meta":{"lineno":10,"filename":"DMChannel.js","path":"src/structures"},"order":46},"functions":[{"id":"DMChannel#toString","longname":"DMChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","params":[],"returns":[[[["String"],""]]],"meta":{"lineno":36,"filename":"DMChannel.js","path":"src/structures"},"order":49},{"id":"DMChannel#sendMessage","longname":"DMChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":240},{"id":"DMChannel#sendTTSMessage","longname":"DMChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"DMChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":241},{"id":"DMChannel#delete","longname":"DMChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"DMChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":249}],"properties":[{"id":"DMChannel#recipient","longname":"DMChannel#recipient","name":"recipient","scope":"instance","kind":"member","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"DMChannel.js","path":"src/structures"},"order":47},{"id":"DMChannel#lastMessageID","longname":"DMChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":28,"filename":"DMChannel.js","path":"src/structures"},"order":48},{"id":"DMChannel#messages","longname":"DMChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":239},{"id":"DMChannel#client","longname":"DMChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"DMChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":247},{"id":"DMChannel#id","longname":"DMChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"DMChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":248}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":24,"filename":"Guild.js","path":"src/structures"},"order":50},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[[["String"],""]]],"meta":{"lineno":117,"filename":"Guild.js","path":"src/structures"},"order":58},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]],"meta":{"lineno":131,"filename":"Guild.js","path":"src/structures"},"order":59},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[[[["GuildMember"],""]],[[["null"],""]]],"meta":{"lineno":143,"filename":"Guild.js","path":"src/structures"},"order":60},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":154,"filename":"Guild.js","path":"src/structures"},"order":61},{"id":"Guild#setup","longname":"Guild#setup","name":"setup","scope":"instance","kind":"function","description":"Sets up the Guild","memberof":"Guild","params":[{"type":{"names":["any"]},"name":"data"}],"returns":[[[["null"],""]]],"access":"private","meta":{"lineno":188,"filename":"Guild.js","path":"src/structures"},"order":62},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]],"meta":{"lineno":328,"filename":"Guild.js","path":"src/structures"},"order":78},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":341,"filename":"Guild.js","path":"src/structures"},"order":79},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":354,"filename":"Guild.js","path":"src/structures"},"order":80},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":367,"filename":"Guild.js","path":"src/structures"},"order":81},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":384,"filename":"Guild.js","path":"src/structures"},"order":82},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":398,"filename":"Guild.js","path":"src/structures"},"order":83},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":412,"filename":"Guild.js","path":"src/structures"},"order":84},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":426,"filename":"Guild.js","path":"src/structures"},"order":85},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":440,"filename":"Guild.js","path":"src/structures"},"order":86},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":454,"filename":"Guild.js","path":"src/structures"},"order":87},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":468,"filename":"Guild.js","path":"src/structures"},"order":88},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"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.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":482,"filename":"Guild.js","path":"src/structures"},"order":89},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Guild",", "],["Error",">"]]],"meta":{"lineno":496,"filename":"Guild.js","path":"src/structures"},"order":90}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":[[[["Client"],""]]],"meta":{"lineno":30,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":36,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["GuildChannel",">"]]],"meta":{"lineno":42,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":[[["Map",".<"],["String",", "],["Role",">"]]],"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":59,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":64,"filename":"Guild.js","path":"src/structures"},"order":56},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":195,"filename":"Guild.js","path":"src/structures"},"order":63},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":200,"filename":"Guild.js","path":"src/structures"},"order":64},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":[[[["String"],""]]],"meta":{"lineno":205,"filename":"Guild.js","path":"src/structures"},"order":65},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":210,"filename":"Guild.js","path":"src/structures"},"order":66},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":215,"filename":"Guild.js","path":"src/structures"},"order":67},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":[[[["Date"],""]]],"meta":{"lineno":220,"filename":"Guild.js","path":"src/structures"},"order":68},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":225,"filename":"Guild.js","path":"src/structures"},"order":69},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":230,"filename":"Guild.js","path":"src/structures"},"order":70},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":235,"filename":"Guild.js","path":"src/structures"},"order":71},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":240,"filename":"Guild.js","path":"src/structures"},"order":72},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":245,"filename":"Guild.js","path":"src/structures"},"order":73},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":[[[["Boolean"],""]]],"meta":{"lineno":250,"filename":"Guild.js","path":"src/structures"},"order":74},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":[[[["Number"],""]]],"meta":{"lineno":255,"filename":"Guild.js","path":"src/structures"},"order":75},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":[[[["User"],""]]],"meta":{"lineno":269,"filename":"Guild.js","path":"src/structures"},"order":76},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":[[[["GuildChannel"],""]]],"meta":{"lineno":282,"filename":"Guild.js","path":"src/structures"},"order":77}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":91},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":98},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":99},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":100},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":101},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":102},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":103},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[[["Promise",".<"],["Channel",">"]]],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":276}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":92},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":93},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":94},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":95},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":96},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":97},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":[[[["Client"],""]]],"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":274},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":[[[["String"],""]]],"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":275}],"events":[]},"GuildMember":{"meta":{"id":"GuildMember","longname":"GuildMember","name":"GuildMember","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a Member of a Guild on Discord","meta":{"lineno":7,"filename":"GuildMember.js","path":"src/structures"},"order":104},"functions":[{"id":"GuildMember#deleteDM","longname":"GuildMember#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":133,"filename":"GuildMember.js","path":"src/structures"},"order":120},{"id":"GuildMember#kick","longname":"GuildMember#kick","name":"kick","scope":"instance","kind":"function","description":"Kick this member from the Guild","memberof":"GuildMember","params":[],"returns":[[["Promise",".<"],["GuildMember",">"]]],"meta":{"lineno":141,"filename":"GuildMember.js","path":"src/structures"},"order":121},{"id":"GuildMember#sendMessage","longname":"GuildMember#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":245},{"id":"GuildMember#sendTTSMessage","longname":"GuildMember#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"GuildMember","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":246}],"properties":[{"id":"GuildMember#client","longname":"GuildMember#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":[[[["Client"],""]]],"meta":{"lineno":13,"filename":"GuildMember.js","path":"src/structures"},"order":105},{"id":"GuildMember#guild","longname":"GuildMember#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that this member is part of","memberof":"GuildMember","type":[[[["Guild"],""]]],"meta":{"lineno":18,"filename":"GuildMember.js","path":"src/structures"},"order":106},{"id":"GuildMember#user","longname":"GuildMember#user","name":"user","scope":"instance","kind":"member","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":[[[["User"],""]]],"meta":{"lineno":23,"filename":"GuildMember.js","path":"src/structures"},"order":107},{"id":"GuildMember#serverDeaf","longname":"GuildMember#serverDeaf","name":"serverDeaf","scope":"instance","kind":"member","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":36,"filename":"GuildMember.js","path":"src/structures"},"order":108},{"id":"GuildMember#serverMute","longname":"GuildMember#serverMute","name":"serverMute","scope":"instance","kind":"member","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":41,"filename":"GuildMember.js","path":"src/structures"},"order":109},{"id":"GuildMember#selfMute","longname":"GuildMember#selfMute","name":"selfMute","scope":"instance","kind":"member","description":"Whether this member is self-muted","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":46,"filename":"GuildMember.js","path":"src/structures"},"order":110},{"id":"GuildMember#selfDeaf","longname":"GuildMember#selfDeaf","name":"selfDeaf","scope":"instance","kind":"member","description":"Whether this member is self-deafened","memberof":"GuildMember","type":[[[["Boolean"],""]]],"meta":{"lineno":51,"filename":"GuildMember.js","path":"src/structures"},"order":111},{"id":"GuildMember#voiceSessionID","longname":"GuildMember#voiceSessionID","name":"voiceSessionID","scope":"instance","kind":"member","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildMember.js","path":"src/structures"},"order":112},{"id":"GuildMember#voiceChannelID","longname":"GuildMember#voiceChannelID","name":"voiceChannelID","scope":"instance","kind":"member","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":61,"filename":"GuildMember.js","path":"src/structures"},"order":113},{"id":"GuildMember#joinDate","longname":"GuildMember#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date this member joined the guild","memberof":"GuildMember","type":[[[["Date"],""]]],"meta":{"lineno":66,"filename":"GuildMember.js","path":"src/structures"},"order":114},{"id":"GuildMember#roles","longname":"GuildMember#roles","name":"roles","scope":"instance","kind":"member","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","params":[],"type":[[["Array",".<"],["Role",">"]]],"readonly":true,"meta":{"lineno":75,"filename":"GuildMember.js","path":"src/structures"},"order":115},{"id":"GuildMember#mute","longname":"GuildMember#mute","name":"mute","scope":"instance","kind":"member","description":"Whether this member is muted in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":98,"filename":"GuildMember.js","path":"src/structures"},"order":116},{"id":"GuildMember#deaf","longname":"GuildMember#deaf","name":"deaf","scope":"instance","kind":"member","description":"Whether this member is deafened in any way","memberof":"GuildMember","params":[],"type":[[[["Boolean"],""]]],"readonly":true,"meta":{"lineno":107,"filename":"GuildMember.js","path":"src/structures"},"order":117},{"id":"GuildMember#voiceChannel","longname":"GuildMember#voiceChannel","name":"voiceChannel","scope":"instance","kind":"member","description":"The voice channel this member is in, if any","memberof":"GuildMember","params":[],"type":[[[["VoiceChannel"],""]]],"readonly":true,"nullable":true,"meta":{"lineno":116,"filename":"GuildMember.js","path":"src/structures"},"order":118},{"id":"GuildMember#id","longname":"GuildMember#id","name":"id","scope":"instance","kind":"member","description":"The ID of this User","memberof":"GuildMember","params":[],"type":[[[["String"],""]]],"readonly":true,"meta":{"lineno":125,"filename":"GuildMember.js","path":"src/structures"},"order":119}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":122},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":137},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":138},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"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.log);"],"returns":[[["Promise",".<"],["Message",", "],["Error",">"]]],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":139}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":[[[["Channel"],""]]],"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":123},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":[[[["Guild"],""]]],"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":124},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Message","memberof":"Message","type":[[[["Client"],""]]],"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":125},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":[[[["User"],""]]],"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":126},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":127},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":[[[["Date"],""]]],"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":128},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":[[[["Date"],""]]],"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":129},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":130},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":[[[["Boolean"],""]]],"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":131},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":132},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":133},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":[[["Array",".<"],["Object",">"]]],"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":134},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":[[["Array",".<"],["User",">"]]],"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":135},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":[[[["String"],""]]],"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":136}],"events":[]},"PermissionOverwrites":{"meta":{"id":"PermissionOverwrites","longname":"PermissionOverwrites","name":"PermissionOverwrites","scope":"global","kind":"class","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"lineno":4,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":140},"functions":[],"properties":[{"id":"PermissionOverwrites#channel","longname":"PermissionOverwrites#channel","name":"channel","scope":"instance","kind":"member","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":[[[["GuildChannel"],""]]],"meta":{"lineno":10,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":141},{"id":"PermissionOverwrites#type","longname":"PermissionOverwrites#type","name":"type","scope":"instance","kind":"member","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":21,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":142},{"id":"PermissionOverwrites#id","longname":"PermissionOverwrites#id","name":"id","scope":"instance","kind":"member","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":[[[["String"],""]]],"meta":{"lineno":26,"filename":"PermissionOverwrites.js","path":"src/structures"},"order":143}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":144},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":154},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":155},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":156},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":157},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":158},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":159},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Role",", "],["Error",">"]]],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":160},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object",".<"],["String",", "],["Boolean",">"]]],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":161},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"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}"],"returns":[[[["Boolean"],""]]],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":162}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":[[[["Guild"],""]]],"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":145},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":146},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":147},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":[[[["String"],""]]],"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":148},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":149},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":150},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":151},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":[[[["Number"],""]]],"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":152},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":[[[["Boolean"],""]]],"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":153}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":163},"functions":[{"id":"TextChannel#sendMessage","longname":"TextChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":243},{"id":"TextChannel#sendTTSMessage","longname":"TextChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":244},{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":256},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":257},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":258},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":259},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":260},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":261}],"properties":[{"id":"TextChannel#messages","longname":"TextChannel#messages","name":"messages","scope":"instance","kind":"member","implements":["TextBasedChannel#messages"],"description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":242},{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":250},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":251},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":252},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":253},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":254},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":255}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":164},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[[["String"],""]]],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":172},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[[["Promise",".<"],["DMChannel",">"]]],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":173},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","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","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":174},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":237},{"id":"User#sendTTSMessage","longname":"User#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendTTSMessage"],"description":"Send a text-to-speech message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":238}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":165},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":166},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":167},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":168},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":[[[["Boolean"],""]]],"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":169},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":170},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":[[[["String"],""]]],"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":171}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":7,"filename":"VoiceChannel.js","path":"src/structures"},"order":175},"functions":[{"id":"VoiceChannel#setBitrate","longname":"VoiceChannel#setBitrate","name":"setBitrate","scope":"instance","kind":"function","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new bitrate","name":"bitrate"}],"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.log);"],"returns":[[["Promise",".<"],["VoiceChannel",">"]]],"meta":{"lineno":41,"filename":"VoiceChannel.js","path":"src/structures"},"order":179},{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"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","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":268},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[[[["EvaluatedPermissions"],""]]],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":269},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":270},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":271},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"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.log);"],"returns":[[["Promise",".<"],["GuildChannel",">"]]],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":272},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[[[["String"],""]]],"meta":{"lineno":220,"filename":"GuildChannel.js","path":"src/structures"},"order":273}],"properties":[{"id":"VoiceChannel#members","longname":"VoiceChannel#members","name":"members","scope":"instance","kind":"member","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":[[["Map",".<"],["String",", "],["GuildMember",">"]]],"meta":{"lineno":14,"filename":"VoiceChannel.js","path":"src/structures"},"order":176},{"id":"VoiceChannel#bitrate","longname":"VoiceChannel#bitrate","name":"bitrate","scope":"instance","kind":"member","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":23,"filename":"VoiceChannel.js","path":"src/structures"},"order":177},{"id":"VoiceChannel#userLimit","longname":"VoiceChannel#userLimit","name":"userLimit","scope":"instance","kind":"member","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"VoiceChannel.js","path":"src/structures"},"order":178},{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":262},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":263},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":[[[["Number"],""]]],"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":264},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":[[[["String"],""]]],"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":265},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":266},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":[[["Array",".<"],["PermissionOverwrites",">"]]],"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":267}],"events":[]},"RequestHandler":{"meta":{"id":"RequestHandler","longname":"RequestHandler","name":"RequestHandler","scope":"global","kind":"class","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","meta":{"lineno":5,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":189},"functions":[{"id":"RequestHandler#push","longname":"RequestHandler#push","name":"push","scope":"instance","kind":"function","description":"Push a new API request into this bucket","memberof":"RequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":193,"returns":[[[["null"],""]]]},{"id":"RequestHandler#handle","longname":"RequestHandler#handle","name":"handle","scope":"instance","kind":"function","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":194,"returns":[[[["null"],""]]]}],"properties":[{"id":"RequestHandler#restManager","longname":"RequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":190},{"id":"RequestHandler#queue","longname":"RequestHandler#queue","name":"queue","scope":"instance","kind":"member","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":191},{"id":"RequestHandler#globalLimit","longname":"RequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":192}],"events":[]},"SequentialRequestHandler":{"meta":{"id":"SequentialRequestHandler","longname":"SequentialRequestHandler","name":"SequentialRequestHandler","scope":"global","kind":"class","augments":["RequestHandler"],"description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","access":"private","meta":{"lineno":10,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":195},"functions":[{"id":"SequentialRequestHandler#execute","longname":"SequentialRequestHandler#execute","name":"execute","scope":"instance","kind":"function","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the item to execute","name":"item"}],"returns":[[["Promise",".<"],["Object",", "],["Error",">"]]],"meta":{"lineno":39,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":198},{"id":"SequentialRequestHandler#push","longname":"SequentialRequestHandler#push","name":"push","scope":"instance","kind":"function","inherits":"RequestHandler#push","inherited":true,"overrides":"RequestHandler#push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","params":[{"type":{"names":["APIRequest"]},"description":"the new request to push into the queue","name":"request"}],"meta":{"lineno":36,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":292,"returns":[[[["null"],""]]]},{"id":"SequentialRequestHandler#handle","longname":"SequentialRequestHandler#handle","name":"handle","scope":"instance","kind":"function","inherits":"RequestHandler#handle","inherited":true,"overrides":"RequestHandler#handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","params":[],"meta":{"lineno":43,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":293,"returns":[[[["null"],""]]]}],"properties":[{"id":"SequentialRequestHandler#waiting","longname":"SequentialRequestHandler#waiting","name":"waiting","scope":"instance","kind":"member","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":[[[["Boolean"],""]]],"meta":{"lineno":19,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":196},{"id":"SequentialRequestHandler#timeDifference","longname":"SequentialRequestHandler#timeDifference","name":"timeDifference","scope":"instance","kind":"member","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":[[[["Number"],""]]],"meta":{"lineno":26,"filename":"Sequential.js","path":"src/client/rest/RequestHandlers"},"order":197},{"id":"SequentialRequestHandler#restManager","longname":"SequentialRequestHandler#restManager","name":"restManager","scope":"instance","kind":"member","inherits":"RequestHandler#restManager","inherited":true,"description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":[[[["RESTManager"],""]]],"meta":{"lineno":11,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":289},{"id":"SequentialRequestHandler#queue","longname":"SequentialRequestHandler#queue","name":"queue","scope":"instance","kind":"member","inherits":"RequestHandler#queue","inherited":true,"description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":[[["Array",".<"],["APIRequest",">"]]],"meta":{"lineno":17,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":290},{"id":"SequentialRequestHandler#globalLimit","longname":"SequentialRequestHandler#globalLimit","name":"globalLimit","scope":"instance","kind":"member","inherits":"RequestHandler#globalLimit","inherited":true,"overrides":"RequestHandler#globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","params":[],"type":[[[["Boolean"],""]]],"meta":{"lineno":24,"filename":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"order":291}],"events":[]},"WebSocketManager":{"meta":{"id":"WebSocketManager","longname":"WebSocketManager","name":"WebSocketManager","scope":"global","kind":"class","description":"The WebSocket Manager of the Client","access":"private","meta":{"lineno":10,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":212},"functions":[{"id":"WebSocketManager#connect","longname":"WebSocketManager#connect","name":"connect","scope":"instance","kind":"function","description":"Connects the client to a given gateway","memberof":"WebSocketManager","params":[{"type":{"names":["String"]},"description":"the gateway to connect to","name":"gateway"}],"returns":[[[["null"],""]]],"meta":{"lineno":54,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":219},{"id":"WebSocketManager#send","longname":"WebSocketManager#send","name":"send","scope":"instance","kind":"function","description":"Sends a packet to the gateway","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"An object that can be JSON stringified","name":"packet"}],"returns":[[[["null"],""]]],"meta":{"lineno":76,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":222},{"id":"WebSocketManager#eventOpen","longname":"WebSocketManager#eventOpen","name":"eventOpen","scope":"instance","kind":"function","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":86,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":223},{"id":"WebSocketManager#_sendResume","longname":"WebSocketManager#_sendResume","name":"_sendResume","scope":"instance","kind":"function","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":98,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":224},{"id":"WebSocketManager#_sendNewIdentify","longname":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","scope":"instance","kind":"function","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":115,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":225},{"id":"WebSocketManager#eventClose","longname":"WebSocketManager#eventClose","name":"eventClose","scope":"instance","kind":"function","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":130,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":226},{"id":"WebSocketManager#eventMessage","longname":"WebSocketManager#eventMessage","name":"eventMessage","scope":"instance","kind":"function","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","params":[{"type":{"names":["Object"]},"description":"the received websocket data","name":"data"}],"returns":[[[["Boolean"],""]]],"meta":{"lineno":142,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":227},{"id":"WebSocketManager#eventError","longname":"WebSocketManager#eventError","name":"eventError","scope":"instance","kind":"function","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":166,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":228},{"id":"WebSocketManager#checkIfReady","longname":"WebSocketManager#checkIfReady","name":"checkIfReady","scope":"instance","kind":"function","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":176,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":229},{"id":"WebSocketManager#tryReconnect","longname":"WebSocketManager#tryReconnect","name":"tryReconnect","scope":"instance","kind":"function","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","params":[],"returns":[[[["null"],""]]],"meta":{"lineno":200,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":231}],"properties":[{"id":"WebSocketManager#client","longname":"WebSocketManager#client","name":"client","scope":"instance","kind":"member","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":[[[["Client"],""]]],"meta":{"lineno":17,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":213},{"id":"WebSocketManager#packetManager","longname":"WebSocketManager#packetManager","name":"packetManager","scope":"instance","kind":"member","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":[[[["PacketManager"],""]]],"meta":{"lineno":23,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":214},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":28,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":215},{"id":"WebSocketManager#sessionID","longname":"WebSocketManager#sessionID","name":"sessionID","scope":"instance","kind":"member","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":34,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":216},{"id":"WebSocketManager#sequence","longname":"WebSocketManager#sequence","name":"sequence","scope":"instance","kind":"member","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":[[[["Number"],""]]],"nullable":true,"meta":{"lineno":40,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":217},{"id":"WebSocketManager#gateway","longname":"WebSocketManager#gateway","name":"gateway","scope":"instance","kind":"member","description":"The gateway address for this WebSocket connection, null if not yet available.","memberof":"WebSocketManager","type":[[[["String"],""]]],"nullable":true,"meta":{"lineno":46,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":218},{"id":"WebSocketManager#status","longname":"WebSocketManager#status","name":"status","scope":"instance","kind":"member","description":"The status of the Client's connection, a type of Constants.Status","memberof":"WebSocketManager","type":[[[["Number"],""]]],"meta":{"lineno":59,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":220},{"id":"WebSocketManager#ws","longname":"WebSocketManager#ws","name":"ws","scope":"instance","kind":"member","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":[[[["WebSocket"],""]]],"nullable":true,"meta":{"lineno":64,"filename":"WebSocketManager.js","path":"src/client/websocket"},"order":221}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","params":[],"meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":233},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":25,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":235},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[[["Promise",".<"],["Message",">"]]],"meta":{"lineno":38,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":236}],"properties":[{"id":"TextBasedChannel#messages","longname":"TextBasedChannel#messages","name":"messages","scope":"instance","kind":"member","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":[[["Map",".<"],["String",", "],["Message",">"]]],"meta":{"lineno":12,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":234}],"events":[]}},"typedefs":{"UserResolvable":{"id":"UserResolvable","longname":"UserResolvable","name":"UserResolvable","scope":"global","kind":"typedef","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)","type":{"names":["User","String","Message","Guild"]},"meta":{"lineno":23,"filename":"ClientDataResolver.js","path":"src/client"},"order":18},"GuildResolvable":{"id":"GuildResolvable","longname":"GuildResolvable","name":"GuildResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"names":["Guild"]},"meta":{"lineno":51,"filename":"ClientDataResolver.js","path":"src/client"},"order":20},"GuildMemberResolvable":{"id":"GuildMemberResolvable","longname":"GuildMemberResolvable","name":"GuildMemberResolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"names":["Guild"]},"meta":{"lineno":69,"filename":"ClientDataResolver.js","path":"src/client"},"order":22},"Base64Resolvable":{"id":"Base64Resolvable","longname":"Base64Resolvable","name":"Base64Resolvable","scope":"global","kind":"typedef","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 String","type":{"names":["Buffer","String"]},"meta":{"lineno":98,"filename":"ClientDataResolver.js","path":"src/client"},"order":24},"ChannelResolvable":{"id":"ChannelResolvable","longname":"ChannelResolvable","name":"ChannelResolvable","scope":"global","kind":"typedef","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An ID of a Channel","type":{"names":["Channel","String"]},"meta":{"lineno":118,"filename":"ClientDataResolver.js","path":"src/client"},"order":26},"StringResolvable":{"id":"StringResolvable","longname":"StringResolvable","name":"StringResolvable","scope":"global","kind":"typedef","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 object","type":{"names":["String","Array","Object"]},"meta":{"lineno":142,"filename":"ClientDataResolver.js","path":"src/client"},"order":28}}}} \ No newline at end of file +{"meta":{"version":10,"date":1471796798712},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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.","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"}}]},{"id":"ClientDataResolver","name":"ClientDataResolver","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","meta":{"line":18,"file":"ClientDataResolver.js","path":"src/client"},"access":"private","methods":[{"id":"ClientDataResolver#resolveString","name":"resolveString","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","meta":{"line":155,"file":"ClientDataResolver.js","path":"src/client"},"returns":{"types":[[["String",""]]]},"params":[{"name":"stringResolvable","description":"the string resolvable to resolve","type":{"types":[[["StringResolvable",""]]]}}]}],"properties":[],"events":[]},{"id":"ClientManager","name":"ClientManager","description":"Manages the State and Background Tasks of the Client","meta":{"line":7,"file":"ClientManager.js","path":"src/client"},"access":"private","methods":[{"id":"ClientManager#setupKeepAlive","name":"setupKeepAlive","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","meta":{"line":46,"file":"ClientManager.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"time","description":"the interval in milliseconds at which heartbeat packets should be sent","type":{"types":[[["Number",""]]]}}]}],"properties":[{"id":"ClientManager#heartbeatInterval","name":"heartbeatInterval","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":{"types":[[["Number",""]]]},"meta":{"line":19,"file":"ClientManager.js","path":"src/client"}}],"events":[]},{"id":"RequestHandler","name":"RequestHandler","description":"A base class for different types of rate limiting handlers for the REST API.","meta":{"line":5,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"access":"private","methods":[{"id":"RequestHandler#handle","name":"handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","meta":{"line":43,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"RequestHandler#globalLimit","name":"globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","type":{"types":[[["Boolean",""]]]},"meta":{"line":24,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}}],"events":[]},{"id":"SequentialRequestHandler","name":"SequentialRequestHandler","description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","meta":{"line":10,"file":"Sequential.js","path":"src/client/rest/RequestHandlers"},"extends":["RequestHandler"],"access":"private","methods":[{"id":"SequentialRequestHandler#handle","name":"handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","inherits":"RequestHandler#handle","inherited":true,"meta":{"line":43,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"SequentialRequestHandler#globalLimit","name":"globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","type":{"types":[[["Boolean",""]]]},"meta":{"line":24,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}}],"events":[]},{"id":"WebSocketManager","name":"WebSocketManager","description":"The WebSocket Manager of the Client","meta":{"line":10,"file":"WebSocketManager.js","path":"src/client/websocket"},"access":"private","methods":[{"id":"WebSocketManager#tryReconnect","name":"tryReconnect","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","meta":{"line":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"WebSocketManager#ws","name":"ws","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":{"types":[[["WebSocket",""]]]},"meta":{"line":64,"file":"WebSocketManager.js","path":"src/client/websocket"}}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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#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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":25,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"properties":[{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}}]} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js deleted file mode 100644 index 53881c5c1..000000000 --- a/docs/gen/index.js +++ /dev/null @@ -1,166 +0,0 @@ -let fs; -/* eslint no-console:0 no-return-assign:0 */ -let parse; - -const customDocs = require('../custom/index'); - -const GEN_VERSION = 10; - -try { - fs = require('fs-extra'); - parse = require('jsdoc-parse'); -} catch (e) { - console.log('Error loading fs-extra or jsdoc-parse:'); - console.log(e); - process.exit(); -} - -console.log('Starting...'); - -let json = ''; - -const stream = parse({ - src: ['./src/*.js', './src/*/*.js', './src/**/*.js'], - private: true, -}); - -const cwd = (`${process.cwd()}\\`).replace(/\\/g, '/'); - -const regex = /([\w]+)([^\w]+)/; -const regexG = /([\w]+)([^\w]+)/g; - -function matchReturnName(str) { - const matches = str.match(regexG); - const output = []; - if (matches) { - for (const match of matches) { - const groups = match.match(regex); - output.push([groups[1], groups[2]]); - } - } else { - output.push([str.match(/(\w+)/g), '']); - } - return output; -} - -function cleanPaths() { - for (const item of json) { - if (item.meta && item.meta.path) { - item.meta.path = item.meta.path.replace(/\\/g, '/').replace(cwd, ''); - } - } -} - -function firstPass() { - const cleaned = { - classes: {}, - interfaces: {}, - typedefs: {}, - }; - for (const itemID in json) { - const item = json[itemID]; - if (item.kind === 'class') { - delete json[itemID]; - cleaned.classes[item.longname] = { - meta: item, - functions: [], - properties: [], - events: [], - }; - } else if (item.kind === 'interface') { - delete json[itemID]; - cleaned.interfaces[item.longname] = { - meta: item, - functions: [], - properties: [], - events: [], - }; - } - } - return cleaned; -} - -const seenEvents = {}; - -function clean() { - const cleaned = firstPass(); - for (const item of json) { - if (!item) { - continue; - } - if (item.kind === 'member') { - const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; - const newTypes = []; - for (const name of item.type.names) { - newTypes.push(matchReturnName(name)); - } - item.type = newTypes; - obj.properties.push(item); - } else if (item.kind === 'function' && item.memberof) { - const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; - const newReturns = []; - if (!item.returns) { - item.returns = [{ - type: { - names: ['null'], - }, - }]; - } - for (const name of item.returns[0].type.names) { - newReturns.push(matchReturnName(name)); - } - item.returns = newReturns; - obj.functions.push(item); - } else if (item.kind === 'typedef') { - cleaned.typedefs[item.longname] = item; - } else if (item.kind === 'constructor') { - const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; - obj.constructor = item; - } else if (item.kind === 'event') { - if (seenEvents[item.name]) { - console.log('dupe logs for', item.name); - } - seenEvents[item.name] = true; - const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; - if (item.params) { - for (const param of item.params) { - const newTypes = []; - for (const name of param.type.names) { - newTypes.push(matchReturnName(name)); - } - param.type = newTypes; - } - } - item.params = [ - { - type: item.params, - }, - ]; - obj.events.push(item); - } - } - json = cleaned; -} - -function next() { - json = JSON.parse(json); - cleanPaths(); - console.log('parsed inline code'); - clean(); - json = { - meta: { - version: GEN_VERSION, - }, - custom: customDocs, - json, - }; - fs.writeFile('./docs/docs.json', JSON.stringify(json, null, 0), err => { - if (err) { - throw err; - } - console.log('done'); - }); -} - -stream.on('data', chunk => json += chunk.toString('utf-8')); -stream.on('end', () => next()); diff --git a/docs/generator/config.json b/docs/generator/config.json new file mode 100644 index 000000000..e6c07de1b --- /dev/null +++ b/docs/generator/config.json @@ -0,0 +1,4 @@ +{ + "GEN_VERSION": 10, + "COMPRESS": false +} \ No newline at end of file diff --git a/docs/generator/doc-scanner.js b/docs/generator/doc-scanner.js new file mode 100644 index 000000000..241e0dd3d --- /dev/null +++ b/docs/generator/doc-scanner.js @@ -0,0 +1,25 @@ +/* eslint no-console:0 no-return-assign:0 */ +const parse = require('jsdoc-parse'); + +module.exports = class DocumentationScanner { + constructor(generator) { + this.generator = generator; + } + + scan(directory) { + return new Promise((resolve, reject) => { + const stream = parse({ + src: [`${directory}*.js`, `${directory}**/*.js`], + private: true, + }); + + let json = ''; + stream.on('data', chunk => json += chunk.toString('utf-8')); + stream.on('error', reject); + stream.on('end', () => { + json = JSON.parse(json); + resolve(json); + }); + }); + } +}; diff --git a/docs/generator/documentation.js b/docs/generator/documentation.js new file mode 100644 index 000000000..1a506e217 --- /dev/null +++ b/docs/generator/documentation.js @@ -0,0 +1,111 @@ +const DocumentedClass = require('./types/DocumentedClass'); +const DocumentedInterface = require('./types/DocumentedInterface'); +const DocumentedTypeDef = require('./types/DocumentedTypeDef'); +const DocumentedConstructor = require('./types/DocumentedConstructor'); +const DocumentedMember = require('./types/DocumentedMember'); +const DocumentedFunction = require('./types/DocumentedFunction'); +const DocumentedEvent = require('./types/DocumentedEvent'); +const GEN_VERSION = require('./config.json').GEN_VERSION; + +class Documentation { + constructor(items) { + this.classes = new Map(); + this.interfaces = new Map(); + this.typedefs = new Map(); + this.parse(items); + } + + registerRoots(data) { + for (const item of data) { + switch (item.kind) { + case 'class': + this.classes.set(item.name, new DocumentedClass(this, item)); + break; + case 'interface': + this.interfaces.set(item.name, new DocumentedInterface(this, item)); + break; + case 'typedef': + this.typedefs.set(item.name, new DocumentedTypeDef(this, item)); + break; + default: + break; + } + } + } + + findParent(item) { + if (['constructor', 'member', 'function', 'event'].indexOf(item.kind) > -1) { + if (this.classes.get(item.memberof)) { + return this.classes.get(item.memberof); + } + if (this.interfaces.get(item.memberof)) { + return this.interfaces.get(item.memberof); + } + } + return; + } + + parse(items) { + this.registerRoots( + items.filter( + item => ['class', 'interface', 'typedef'].indexOf(item.kind) > -1 + ) + ); + + const members = items.filter( + item => ['class', 'interface', 'typedef'].indexOf(item.kind) === -1 + ); + + const unknowns = new Map(); + for (const member of members) { + let item; + switch (member.kind) { + case 'constructor': + item = new DocumentedConstructor(this, member); + break; + case 'member': + item = new DocumentedMember(this, member); + break; + case 'function': + item = new DocumentedFunction(this, member); + break; + case 'event': + item = new DocumentedEvent(this, member); + break; + default: + unknowns.set(member.kind, member); + break; + } + if (!item) { + continue; + } + const parent = this.findParent(member); + if (!parent) { + throw new Error(`${member.name} has no accessible parent - ${JSON.stringify(member)}`); + } + parent.add(item); + } + if (unknowns.size > 0) { + Array.from(unknowns.keys()).map( + k => console.log(`Unknown documentation kind ${k} - \n${JSON.stringify(unknowns.get(k))}\n` + )); + } + } + + serialize() { + const meta = { + version: GEN_VERSION, + date: Date.now(), + }; + + const serialized = { + meta, + classes: Array.from(this.classes.values()).map(c => c.serialize()), + interfaces: Array.from(this.interfaces.values()).map(i => i.serialize()), + typedefs: Array.from(this.typedefs.values()).map(t => t.serialize()), + }; + return serialized; + } +} + +module.exports = Documentation; diff --git a/docs/generator/generator.js b/docs/generator/generator.js new file mode 100644 index 000000000..4c925576d --- /dev/null +++ b/docs/generator/generator.js @@ -0,0 +1,26 @@ +/* eslint no-console:0 no-return-assign:0 */ +const GEN_VERSION = require('./config.json').GEN_VERSION; +const compress = require('./config.json').COMPRESS; +const DocumentationScanner = require('./doc-scanner'); +const Documentation = require('./documentation'); +const fs = require('fs-extra'); +const zlib = require('zlib'); + +const docScanner = new DocumentationScanner(this); + +function parseDocs(json) { + console.log(`${json.length} items found`); + const documentation = new Documentation(json); + let output = JSON.stringify(documentation.serialize(), null, 0); + if (compress) { + output = zlib.deflateSync(output).toString('utf8'); + } + fs.writeFileSync('./docs/docs.json', output); +} + +console.log(`using format version ${GEN_VERSION}`); +console.log('scanning for documentation'); + +docScanner.scan('./src/') + .then(parseDocs) + .catch(console.error); diff --git a/docs/generator/types/DocumentedClass.js b/docs/generator/types/DocumentedClass.js new file mode 100644 index 000000000..d20ebeaa1 --- /dev/null +++ b/docs/generator/types/DocumentedClass.js @@ -0,0 +1,83 @@ +const DocumentedItem = require('./DocumentedItem'); +const DocumentedItemMeta = require('./DocumentedItemMeta'); +const DocumentedConstructor = require('./DocumentedConstructor'); +const DocumentedFunction = require('./DocumentedFunction'); +const DocumentedMember = require('./DocumentedMember'); +const DocumentedEvent = require('./DocumentedEvent'); + +/* +{ id: 'VoiceChannel', + longname: 'VoiceChannel', + name: 'VoiceChannel', + scope: 'global', + kind: 'class', + augments: [ 'GuildChannel' ], + description: 'Represents a Server Voice Channel on Discord.', + meta: + { lineno: 7, + filename: 'VoiceChannel.js', + path: 'src/structures' }, + order: 232 } + */ + +class DocumentedClass extends DocumentedItem { + + constructor(docParent, data) { + super(docParent, data); + this.props = new Map(); + this.methods = new Map(); + this.events = new Map(); + } + + add(item) { + if (item instanceof DocumentedConstructor) { + if (this.classConstructor) { + throw new Error(`Doc ${this.directData.name} already has constructor - ${this.directData.classConstructor}`); + } + this.classConstructor = item; + } else if (item instanceof DocumentedFunction) { + if (this.methods.get(item.directData.name)) { + throw new Error(`Doc ${this.directData.name} already has method ${item.name}`); + } + this.methods.set(item.name, item); + } else if (item instanceof DocumentedMember) { + if (this.props.get(item.directData.name)) { + throw new Error(`Doc ${this.directData.name} already has prop ${item.name}`); + } + this.props.set(item.name, item); + } else if (item instanceof DocumentedEvent) { + if (this.props.get(item.directData.name)) { + throw new Error(`Doc ${this.directData.name} already has event ${item.name}`); + } + this.events.set(item.name, item); + } + } + + registerMetaInfo(data) { + super.registerMetaInfo(data); + this.directData = data; + this.directData.meta = new DocumentedItemMeta(this, data.meta); + } + + serialize() { + super.serialize(); + const { id, name, description, meta, augments, access } = this.directData; + const serialized = { + id, + name, + description, + meta: meta.serialize(), + extends: augments, + access, + }; + if (this.classConstructor) { + serialized.classConstructor = this.classConstructor.serialize(); + } + serialized.methods = Array.from(this.methods.values()).map(m => m.serialize()); + serialized.properties = Array.from(this.props.values()).map(p => p.serialize()); + serialized.events = Array.from(this.events.values()).map(e => e.serialize()); + return serialized; + } +} + +module.exports = DocumentedClass; diff --git a/docs/generator/types/DocumentedConstructor.js b/docs/generator/types/DocumentedConstructor.js new file mode 100644 index 000000000..136e11428 --- /dev/null +++ b/docs/generator/types/DocumentedConstructor.js @@ -0,0 +1,32 @@ +const DocumentedItem = require('./DocumentedItem'); + +/* +{ id: 'Client()', + longname: 'Client', + name: 'Client', + kind: 'constructor', + description: 'Creates an instance of Client.', + memberof: 'Client', + params: + [ { type: [Object], + optional: true, + description: 'options to pass to the client', + name: 'options' } ], + order: 10 } +*/ + +class DocumentedConstructor extends DocumentedItem { + + registerMetaInfo(data) { + this.directData = data; + } + + serialize() { + super.serialize(); + const { id, name, description, memberof, access } = this.directData; + return { id, name, description, memberof, access }; + } + +} + +module.exports = DocumentedConstructor; diff --git a/docs/generator/types/DocumentedEvent.js b/docs/generator/types/DocumentedEvent.js new file mode 100644 index 000000000..17e029a91 --- /dev/null +++ b/docs/generator/types/DocumentedEvent.js @@ -0,0 +1,72 @@ +const DocumentedItem = require('./DocumentedItem'); +const DocumentedItemMeta = require('./DocumentedItemMeta'); + +/* +{ + "id":"Client#event:guildMemberRolesUpdate", + "longname":"Client#event:guildMemberRolesUpdate", + "name":"guildMemberRolesUpdate", + "scope":"instance", + "kind":"event", + "description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role", + "memberof":"Client", + "params":[ + { + "type":{ + "names":[ + "Guild" + ] + }, + "description":"the guild that the update affects", + "name":"guild" + }, + { + "type":{ + "names":[ + "Array." + ] + }, + "description":"the roles before the update", + "name":"oldRoles" + }, + { + "type":{ + "names":[ + "Guild" + ] + }, + "description":"the roles after the update", + "name":"newRoles" + } + ], + "meta":{ + "lineno":91, + "filename":"Guild.js", + "path":"src/structures" + }, + "order":110 +} +*/ + +class DocumentedEvent extends DocumentedItem { + + registerMetaInfo(data) { + this.directData = data; + this.directData.meta = new DocumentedItemMeta(this, data.meta); + } + + serialize() { + super.serialize(); + const { id, name, description, memberof, meta } = this.directData; + return { + id, + name, + description, + memberof, + meta: meta.serialize(), + }; + } + +} + +module.exports = DocumentedEvent; diff --git a/docs/generator/types/DocumentedFunction.js b/docs/generator/types/DocumentedFunction.js new file mode 100644 index 000000000..698fb16b5 --- /dev/null +++ b/docs/generator/types/DocumentedFunction.js @@ -0,0 +1,91 @@ +const DocumentedItem = require('./DocumentedItem'); +const DocumentedItemMeta = require('./DocumentedItemMeta'); +const DocumentedVarType = require('./DocumentedVarType'); +const DocumentedParam = require('./DocumentedParam'); + +/* +{ + "id":"ClientUser#sendTTSMessage", + "longname":"ClientUser#sendTTSMessage", + "name":"sendTTSMessage", + "scope":"instance", + "kind":"function", + "inherits":"User#sendTTSMessage", + "inherited":true, + "implements":[ + "TextBasedChannel#sendTTSMessage" + ], + "description":"Send a text-to-speech message to this channel", + "memberof":"ClientUser", + "params":[ + { + "type":{ + "names":[ + "String" + ] + }, + "description":"the content to send", + "name":"content" + } + ], + "examples":[ + "// send a TTS message..." + ], + "returns":[ + { + "type":{ + "names":[ + "Promise." + ] + } + } + ], + "meta":{ + "lineno":38, + "filename":"TextBasedChannel.js", + "path":src/structures/interface" + }, + "order":293 +} + */ + +class DocumentedFunction extends DocumentedItem { + + registerMetaInfo(data) { + super.registerMetaInfo(data); + this.directData = data; + this.directData.meta = new DocumentedItemMeta(this, data.meta); + this.directData.returns = new DocumentedVarType(this, data.returns ? data.returns[0].type : { + names: ['null'], + }); + const newParams = []; + for (const param of data.params) { + newParams.push(new DocumentedParam(this, param)); + } + this.directData.params = newParams; + } + + serialize() { + super.serialize(); + const { + id, name, description, memberof, examples, inherits, inherited, meta, returns, params, access, + } = this.directData; + const serialized = { + id, + access, + name, + description, + memberof, + examples, + inherits, + inherited, + meta: meta.serialize(), + returns: returns.serialize(), + params: params.map(p => p.serialize()), + }; + serialized.implements = this.directData.implements; + return serialized; + } +} + +module.exports = DocumentedFunction; diff --git a/docs/generator/types/DocumentedInterface.js b/docs/generator/types/DocumentedInterface.js new file mode 100644 index 000000000..ce2905785 --- /dev/null +++ b/docs/generator/types/DocumentedInterface.js @@ -0,0 +1,32 @@ +const DocumentedClass = require('./DocumentedClass'); + +/* +{ id: 'TextBasedChannel', + longname: 'TextBasedChannel', + name: 'TextBasedChannel', + scope: 'global', + kind: 'interface', + classdesc: 'Interface for classes that have text-channel-like features', + params: [], + meta: + { lineno: 5, + filename: 'TextBasedChannel.js', + path: 'src/structures/interface' }, + order: 175 } + */ + +class DocumentedInterface extends DocumentedClass { + registerMetaInfo(data) { + super.registerMetaInfo(data); + this.directData = data; + // this.directData.meta = new DocumentedItemMeta(this, data.meta); + } + + serialize() { + const serialized = super.serialize(); + serialized.description = this.directData.classdesc; + return serialized; + } +} + +module.exports = DocumentedInterface; diff --git a/docs/generator/types/DocumentedItem.js b/docs/generator/types/DocumentedItem.js new file mode 100644 index 000000000..562c706d3 --- /dev/null +++ b/docs/generator/types/DocumentedItem.js @@ -0,0 +1,17 @@ +class DocumentedItem { + constructor(parent, info) { + this.parent = parent; + this.directData = {}; + this.registerMetaInfo(info); + } + + registerMetaInfo() { + return; + } + + serialize() { + return; + } +} + +module.exports = DocumentedItem; diff --git a/docs/generator/types/DocumentedItemMeta.js b/docs/generator/types/DocumentedItemMeta.js new file mode 100644 index 000000000..7b44941b6 --- /dev/null +++ b/docs/generator/types/DocumentedItemMeta.js @@ -0,0 +1,29 @@ +const cwd = (`${process.cwd()}\\`).replace(/\\/g, '/'); +const backToForward = /\\/g; + +const DocumentedItem = require('./DocumentedItem'); + +/* + { lineno: 7, + filename: 'VoiceChannel.js', + path: 'src/structures' }, +*/ + +class DocumentedItemMeta extends DocumentedItem { + + registerMetaInfo(data) { + super.registerMetaInfo(data); + this.directData.line = data.lineno; + this.directData.file = data.filename; + this.directData.path = data.path.replace(backToForward, '/').replace(cwd, ''); + } + + serialize() { + super.serialize(); + const { line, file, path } = this.directData; + return { line, file, path }; + } + +} + +module.exports = DocumentedItemMeta; diff --git a/docs/generator/types/DocumentedMember.js b/docs/generator/types/DocumentedMember.js new file mode 100644 index 000000000..064b8ed30 --- /dev/null +++ b/docs/generator/types/DocumentedMember.js @@ -0,0 +1,47 @@ +const DocumentedItem = require('./DocumentedItem'); +const DocumentedItemMeta = require('./DocumentedItemMeta'); +const DocumentedVarType = require('./DocumentedVarType'); + +/* +{ id: 'Client#rest', + longname: 'Client#rest', + name: 'rest', + scope: 'instance', + kind: 'member', + description: 'The REST manager of the client', + memberof: 'Client', + type: { names: [ 'RESTManager' ] }, + access: 'private', + meta: + { lineno: 32, + filename: 'Client.js', + path: 'src/client' }, + order: 11 } +*/ + +class DocumentedMember extends DocumentedItem { + + registerMetaInfo(data) { + super.registerMetaInfo(data); + this.directData = data; + this.directData.meta = new DocumentedItemMeta(this, data.meta); + this.directData.type = new DocumentedVarType(this, data.type); + } + + serialize() { + super.serialize(); + const { id, name, description, memberof, type, access, meta } = this.directData; + return { + id, + name, + description, + memberof, + type: type.serialize(), + access, + meta: meta.serialize(), + }; + } + +} + +module.exports = DocumentedMember; diff --git a/docs/generator/types/DocumentedParam.js b/docs/generator/types/DocumentedParam.js new file mode 100644 index 000000000..d7d25b639 --- /dev/null +++ b/docs/generator/types/DocumentedParam.js @@ -0,0 +1,35 @@ +const DocumentedItem = require('./DocumentedItem'); +const DocumentedVarType = require('./DocumentedVarType'); + +/* +{ + "type":{ + "names":[ + "Guild" + ] + }, + "description":"the roles after the update", + "name":"newRoles" + } +*/ + +class DocumentedParam extends DocumentedItem { + + registerMetaInfo(data) { + super.registerMetaInfo(data); + this.directData = data; + this.directData.type = new DocumentedVarType(this, data.type); + } + + serialize() { + super.serialize(); + const { name, description, type } = this.directData; + return { + name, + description, + type: type.serialize(), + }; + } +} + +module.exports = DocumentedParam; diff --git a/docs/generator/types/DocumentedTypeDef.js b/docs/generator/types/DocumentedTypeDef.js new file mode 100644 index 000000000..a323b2ef3 --- /dev/null +++ b/docs/generator/types/DocumentedTypeDef.js @@ -0,0 +1,44 @@ +const DocumentedItem = require('./DocumentedItem'); +const DocumentedItemMeta = require('./DocumentedItemMeta'); +const DocumentedVarType = require('./DocumentedVarType'); + +/* +{ id: 'StringResolvable', + longname: 'StringResolvable', + name: 'StringResolvable', + scope: 'global', + kind: 'typedef', + description: 'Data that can be resolved to give a String...', + type: { names: [ 'String', 'Array', 'Object' ] }, + meta: + { lineno: 142, + filename: 'ClientDataResolver.js', + path: 'src/client' }, + order: 37 } +*/ + +class DocumentedTypeDef extends DocumentedItem { + + registerMetaInfo(data) { + super.registerMetaInfo(data); + this.directData = data; + this.directData.meta = new DocumentedItemMeta(this, data.meta); + this.directData.type = new DocumentedVarType(this, data.type); + } + + serialize() { + super.serialize(); + const { id, name, description, type, access, meta } = this.directData; + return { + id, + name, + description, + type: type.serialize(), + access, + meta: meta.serialize(), + }; + } + +} + +module.exports = DocumentedTypeDef; diff --git a/docs/generator/types/DocumentedVarType.js b/docs/generator/types/DocumentedVarType.js new file mode 100644 index 000000000..d814ed4ca --- /dev/null +++ b/docs/generator/types/DocumentedVarType.js @@ -0,0 +1,47 @@ +const DocumentedItem = require('./DocumentedItem'); + +/* +{ + "names":[ + "String" + ] +} +*/ + +const regex = /([\w]+)([^\w]+)/; +const regexG = /([\w]+)([^\w]+)/g; + +function splitVarName(str) { + const matches = str.match(regexG); + const output = []; + if (matches) { + for (const match of matches) { + const groups = match.match(regex); + output.push([groups[1], groups[2]]); + } + } else { + output.push([str.match(/(\w+)/g)[0], '']); + } + return output; +} + +class DocumentedVarType extends DocumentedItem { + + registerMetaInfo(data) { + super.registerMetaInfo(data); + this.directData = data; + } + + serialize() { + super.serialize(); + const names = []; + for (const name of this.directData.names) { + names.push(splitVarName(name)); + } + return { + types: names, + }; + } +} + +module.exports = DocumentedVarType; diff --git a/package.json b/package.json index 1eea6d378..605c781a7 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "./src/index", "scripts": { "test": "eslint src/ && node test/random", - "docs": "node docs/gen/index.js" + "docs": "node docs/generator/generator.js" }, "repository": { "type": "git", From ac7c543dfe4c17f9372a6953e70c6a147a5fa90f Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 21 Aug 2016 17:47:12 +0100 Subject: [PATCH 123/324] Fix doc gen --- docs/docs.json | Bin 20751 -> 24030 bytes docs/generator/config.json | 2 +- docs/generator/generator.js | 3 +++ docs/generator/types/DocumentedClass.js | 14 +++++++------- src/client/websocket/WebSocketManager.js | 4 ---- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 715a3f68317de5780ed863a5dcd5f3dec5698ce3..25fe4975284f8f5e6856e5420b4198f999617405 100644 GIT binary patch literal 24030 zcmZvE^_!j5+3rln_qgkxnT)%;X58J~eUH2BJwT8mg*HfO(Y8=1v`8s(D)hRLkOT-x zkfbD#^Yzg7JBP{-=N~xty`PnL59ztC`_c8vT93UG-TC*Q{sc|*mXPp=y zoD!K@_db`4j9?+4WN~+YbI5K=9g{IWWMmJ^`NL>Rc|i#tTK;(Hx@iwhU2=Vj<7HHUd5dm;&RL09#5uC>>+~WrM0ffVZc}wqsVJbWgVpHj7$Us1g7(M_k}e!JAdQ z)~f_8IaWOLR&sC>Zi}Xsrh)3 zU^J9*2Ar88L4X~jvkUs@N179gkDXXNZwB851Ta={?P5gR@dSdMtdb_yf?iDKDFQUL zVJ(h`ozLSv4cS$e>3!292Wu$uy76a_XAP9Rl^Y&~^7v@Q^fmj{j=Ndc!Kf_WZj zNmSLtGH~Vo87Gx0Xr?MKAPJ;mE)L5jBi!^Ph|zR1GRBq-B>wxJ`{1ZOJOmfKdsjVY7>U+-UC2?4151&IZ|2>R$=usGIG z42U;qh!$-W!rpcbJP*_onctKSxd{R)PXD30Ow`;?NTv@67Xi)_kA;G%DH2=HyLHj) zo?R*!8=mo(9)k~1y$o$Tmi@xm*$s86*5T%QL%;+95C%s+4bTl-xdlS)pAGWO%g+t) zfX)|Q0<_Kux2@ZKG6J}eF<&cN?@pAZhE}HuJJteVqfW`ojc4y%x4FjS+g<(@;{>pcERTm# z1>!_0nELXOR(?$VcC8a!AV<^!1mIqroE6CHfb-7`{_TZ_{`#jER>a;BappGN1T^QY zWj(}Fgm|k9S=l{;KKK7p!9*P#lb_xOips!seE1*2Sj5gcL!Yj6&NQ7@XgPE zk{_Z@!yyKI@)nrdg?Q@x+2wrml(}u|5GM9K6_$Yi@Oo5Y{GHJK$LamZ*Ae0kOT}aW4`HzP}g`uD%YX zZ236DT#GtKOA)hs>3R0j76@<+Ut*~Nxgx+-PN6OFHGu!5DsCmj3(f~~Ry`@6Z$nT1A@tMSA2zvWrxb_MsXKvc^lVe7_+L;?n=%^OCKzb5xq;3h;#Kd2lw;htIHd zS~zsRcyU6{WX`LP0aRX*%A1W|U>cSO<96p@=|ScylNDabf>hyb6EBO_ai32D7*!rB zP)u+g*O{`fUKO7q2$I*So@*Aj>&h6E2F46NmToQ(cfwW?>^xyS7b4* z2?6%25DW!#0ZeCsErJSoPQXq?AnKza~h)2?sLQwdEj@rH-t*;D(ER1-+9)u&o}bgF`hb}0yqSb;wnv~`$AE?0pw z0f22^t4bw%f?H~mg+md6>mr%?3nw?k=w>M%MG?cNZyRAF3HF#BZq>irkt&N@ptcRe z6eFHWZLRKj%0`l{3M;%-pcGI9h~;IYUJ$B>0nBj3^?@Q(WkS91{4SeMLt?4dnIF5r z3}HbtOJBVti-xT=Zfz{X3S7mkEQtWi%|i z;?ChoNWrcbWEiXC^7E{vbPjIT$6tT`8*srl&%F$#lRpU5dw_j%-wEz7`ttn;%uzct z0t|z4K|9-EsvoYOno>c5&jb=!s)yaOeD(otWlDvaiOd+AnX=U4Mor4QKb7lzDtbkE z|0T$pnb9GhHT{F1f%E<-F4uy9-4L+tHn1(@Jb0}&1Jqe<1UK?X7w!hLX5S2f(m}jn zbGd5@0%&2h0zo?qU>mH#?62r>!-HMV0$$&Wew%b%DPv1mJcU_ zAcOA$xKZ|(;M-?kfTE`BnP*eQtIn!jr6~bvy_GPw+6LPpx;+2&49f>#0{`okx8|6U zeKO~?=z54e5G#+-(val|HP{a980g&}gH^3m=y<(7qoLw>^)cwc)i*^lae|NTXO#`l z<%-#s3EA2K)|3oZ;CRe1G*xM-h)Pckko;)`mAG>p2GbVG7K z)%#iCjX0RhKc!D=W}>6 z*BG#wK1aW-P-|$(4*TGOuYb+{j^INDoK8SACuFt0POPW^NA5fuG%=sIEzX&GPj`kZ zKumC39x>(8^WdBot{_Hdt`SU72$4FH>Z3XMEO$_aczhT5USI;mz<4Y((nrDBwZz-% zR`k_X+Ddu_E4X)!6RMEcRDzl@l3((5qR|<#|0e;ZOI?SI85l40;h+%l|UW2;q%O_!Ofdrc>hJ7}3mXl+t$iUX* z2avB!;+n4t+7m6Ss$q&V>B4Rdx4RloXmL01(j01HjVRNuu|c_%Oc^F zD%fBlXeiM%QCI>1udEB;4+cCVP@Z9#`!Gkv%YAj`^MMJxBfeYQ`ZGU_9C_#E@->(o z;2M%kbD>v&_AKqIm*tY?ViQYGgZIGpDo_8PIP*L4U3^+3kISf6W`?l5*#5jR&&^BE zngI0PAKfb2<$HFa@EiA?mnFiXQXfv;4g_Q~Y~>5i;4Wlas`?phV34iJECqsMLO5H1 z^N)db4zsKQK4D>u*>kH08|GUaIZ^~}tK5$(Xn#OFT{$Ab8QEA)Oo7^ni(xPYKr1_a78DuCq6L_R<`}R>u~pfK5#Ye%*Ltbc zmB2`zU#p7=gEGA=*BloCo+nymenJtOa!Om^I~Y^I<=wj+nHHcuw5ylrb*-NS?`GS1 z7FeQemwwF4T>J2Mf&{E9V7ZPhklQa-eKuds@e#>5Mz({MfdH>UR?k0wz;e-`@(=sN zr+73K9Bp0gwGfU0Yw<>Q?{2U)!xQbb%b?H&IDnQwDi>?EIWU^m8`#)izY@uQWcmb5 zK@Kaf7sOMi^zKeD`b%*;dwk~@s4V~L-4H5CoFRbKM?VaQ$hHy_{Nsmx*)5g>G3Y7W zj@#kh=YN3w&Z^kpsl#CAUxLnv@9b>}rpSHs5&PiLi+3Z2y~aHOB|{>IYamtY`8IM& zB__)X_@Ig%)P74?nN?LMEY5BaUHL(cS+VELXKKz|g+s$Wvj%XRKyc~s|9<@m(NjeH zCucZ44Wp|2V65(dvGzEJ;wMzScCd0a)yTcADv%n@=2Wg0jfXaKgDd6&5$7tE7bQM7`Bs^Ph_>N0@2$Wr2+2(S0Fl#gz z1jN1nTT!wg45BhT*|uPZpmyE|1m|yfjY2N|CKum)mfdK^=um1XQwxtGMnZGatp1Z@m zpZTe_)DqH?Wh@vN*>+44AK!AkKkdXoIutbqWMxAHctX4Cnm`!5ufD}sTMR3P%9|s_ z;o8ZQi- zz4kanDvzow8yF~V`Q%SfZvuDB;4-#X@4acU5O&;t=nh0PXl{FWuLJVqmvT#(dJP3k zT>EGPxcO()FJI7>Sk%D9U!8fboP|C9`AP6C&`?f3%hY+gy}%OFo-xnqpj^252?KaU zH9MfyEamWofI+taeqhP(jlcE~CF{c3(*XBBxT3z?x(iRW_=!J~8)6Rmvi4FiZ#Kqo z2^dgjy$fC|28&rx1i?N77-k>`q@E5fEWOX0L(K=IZwen}*`0p~3}D&>TiNXHAke!{ zaeqJ&pTS(*1Rkkli@5+eAO>2fFopno_a+!%Z>XrTdH5C^P$WoT@6cb>#%WLPIc zUiqQ6#`9S!K8WQc;N}^*v_Y{w8HM$sg53njq<8-0ecbD>FFzE_k4JJ}@=jk(HsgQp zJ~c&n7xU%C9WRjaVI5V)opge(-?{EPxCcd0uW9TrfzN?RHy1a}2gOM<0#`*12rTBY z7~|>4F@xWC%C*n^*vuJbq*^Wp572|9B**cFl9oIc#Rm7q`*Qix(u%rZei)WPfQm{L zrynpe?~;?3-3Kjzf!6T#T~NImTq_~M#GAYX$&ff&Qr*?0Ml)YIC)bVeO^ild4;V){ z5Hkd}P|Bu?2Q{2~6TCZ>RcizR?9-!gt2F;L1Gwrf0fiMl%kNNAs9d`|Y8%Z0b1D|w zl(U#KUj&`S+n0AdR81jR`;4o{z;1QtB(4AR%o7RS)6i;p1cqgiehnu)+eHu2Tzqjh zw-4lNUJe$Z+AG#lrrIKuC8h@8Pa#Y)o0PA-a1zXXmQvO|u*S4D4*Q5D{5S+($re*7 zl!ex^-U?_eN5Ho#ZadSrZvVqa><_nFTX)3^?g3)@&;MLpY!J6L?!iF~2&m@YWo7!J zK_)9O=9%#-WI+i&{Ym3WtY0RKtVnm3mx_;fUUHIlkt!?A7G;u+<|z7x-Nh#-%6(nb zh-3foK}^70OTSzrTy@0U>0ghEV?{(11P?eUrYcV!39x*~a%Rncr18~*d2kmqcB~0Y znQ;gR`b2C%gcj>UA=dpDy!F$W4UF!Y8^4ZG(+)1alDl9q|8@I|&P}FaXpTi^&`&k7nnLaGDv$~7Cx2Fro> z#V1+~L3os#zyT)iDB9h&Vdn7Yz$|Ea_MdmYB_?=pjFYCbcMHAk#O|Hps^|m7YE+lN zR%Jc`wIZK|dSEHC>1iWhA*c}%snQ2)tw&oN*zWCUjI|^w#{JCivB+Qo-3=m}x_q1X zP8*;4MDA`3vyD<2$X2Kw1*#UTD@ ztig(`%0UZ?Zg(&tZM z(VE>PV5#wGEi`qG>E4-3NAB%g7qQDDb>Y^ zSKeA;E>r>VZeKsJ?v`&Kx@&zO+D&kp@b8CfzM82YV6D1Hd{+&0o=6cUtdLEF~||rrBb&H{U};l2Fs;-@P9pgirHp{)c)h30tF1| z-=BV~^TJc&SQ>(4rw)icYe~UWvAA3oK6_%CqYO~N*@2qYay&PHH4ErLMWSk)UuFSk zb?SP4>&ofxiG!zc5Y=ftbfAR$ya@rYOQ*USK0(aoTQ~vM?)4(`mM>jLngn*&JDsQ1b4_1iR7_(Jr%Tx}fvot@x z6D**_H=l3eMgZp5DILtW#D)6>G7G^L7lRhW6duLknOk#|)1x)1So{l|3OsnDrKpg*Li?A+E~ki)bbA)x*BV+Rv$1b z0?t96%2o4-GI9ME^BJl_;Q7w%xO)GI{&GvB*KuE^oM34TrGVvq@mA5ZMT~8UbYeiq zyZDhZk2c5|!=+zCEO2-=CC#?$8fusbcHgH@GcX_B&8F3X1UxU#SMCgEDH#~N<}f1D zQj5W*@VJAHgXnh4Tb^S@j1PeUYUV(j62~}m86o;EggN?5Gq93&?LpBlJS0-%UEH$W zw2JK_12Q$Nt%{=F6Y7RGq6x+{<8rnsy?{6F}YzAqDo~_ZBiCu$4#nk)5QU9V$@hd01r7Gk~DV= z(zCa0Pz8Gd=BOJO!0#dJ{3v+B8qP;gHPoOcbgd>1Ze*oraX|320OKFA#k<)P084$g zpM#7wboDM31EZ>AW(g?$%Y%O$+lQi#2aUH_!ju!t=k1v4zy;nSn%H-Y06&=AATTlu zmZpmYSDiO={$;h4TLQ(OI|dpVQJd5pMpH!%S{ln1s1E=OVeW1M#}80()ZLjH$z5nr zlPZFB3Y33m(T+!L7!4_Mfn@D=l&{$Bb5k`QU_i@O9yregaI7!^-b>u*TzW1zPz0jt zzs&9dO3wWZJhqGp^mgTNDA6&`fVu^mQ5^FS6ZN9oHUvX4|EVpv%iDqR0M(z+izDWF zpO0!}xqyezknP!F=Q|mn?8cCWau6NG6!Y+pJ6_RzDul3Eri<-h(WZhGZ9PJ#^3kbw zgOvz#9Wxlf+7wtd3z9b{_SY)FiP!)4G^+z#cRN;zU}S z{LX`d`A&dC0N4>BJouw0p_HgPaVRYAhB?-`6_D9d&lXz)oqg4Zvw@?;{@65+1Dt-| z0ld%#Or6tC7Sb5vGDp@6Q1pLqedAS86QUpoL8>bqb%E!ekflVrtU;`=X?JnbS1l^| z5-47UVzXq3r4tUS>Pt5+%&6WmB{R;eAfQYHcpS?R_~0QhW)R@xNJ)j!r++kBF3t?6 zRjYr$_?#HR`ST^uX#QPYNHrvbROx!cHJ{;G+jQk^Xlmoo@Vn8oY&pQ{AiS)zpRcv8 z;JDO{W_VP|5_kZpj|HciPFsMYYV)Wo!IaB$v6@30i)AH{HP87L>jxIYHe*30aoa{v z3dp0f#SuaeVj4BfL2GL1VetUNx%MiT@h4oTGyCDP6jC#+L#D6awgDU{vuv=3tD_(u z<*SomM`6qTXy9XwnP9x9la-fYAHZY_s_NHUpndsU&BHtcI?Vy4?x-Ppvpb7b!&0;D zXck*U&>hUD3a*@V;W-1d`xpBlXIaSu7w_E9k2MVE{N;C?D|}h?!i2{#B(TYWX$|7! zivfA4BTaep6(N1xV~fgvr5;AZ7FdQKQvz6LuWvBc0LOqJLep3eHDbBP)IvGNLKbj} zS*fbcsITmW$-rrtV%WRm&OAH;X*B<<4=5{YFLno`O!!=ZS6S#h6uyNC`1+-+I8L7- z#-IH$(Y~&7aN%B<{wyfLl{X;AhvQj5skJ$pzem%!pGz+>z7Fs3W~;8_)QeKVf$rf7 zXVH?q)F`ic=K+reeKfpmfSLU1RvSxtW9SE3SJx*F^EkDRt?M}-uRkOU7k?YWe6a3S zDV~^A`yFOb=Ms3tHV{xtJ+BGu^Hc9Vk~i#JuFg3X;|=Ga6W9s%aXTmynq$>+Bp3q|UfK4d9Hpvm02tbF-az&pc$= zd$Z@DdMhhIz@O_iEKHmby%55u`^LX)tFu(7EPLwgk^`gEFCFqZ>x*Ooyf?|Y*!+9J z;#sTHR(K7+v#Z@;21cm2J2aDfHtv8esuN~1^z1Yhh^@0P!_dGk2F!nMq&YdduD(TH zv=e#mB;NxkJqSMxD5;o7LJ}1!nSe34zPaXri zdh+7y5JNMmro}T46b7)e1TkJEYyHhWJR?vBI^M95la>g@rCOXCS5Y(n#y3w~=aAQ% z%b8#w2Nnt{Xqq#%w(Itxe()C9E<0ZkGpnhZGSCF|i~BTNl(IZd5w>?eAr^7Itlc6P%yXBp$Z}#%{ovR2xut&@Ta1EXC5_; z7Q(yb#?%9hs$tHK+hJe;Hy1FqI>S+P?h!B#K1A=wFeib0sdOFGTwr=wISC-Y<-83h zw=Zm$%j(Bdb094G=3%CP&md?kokLy+-ty~5Y3)u|4s$bkCR) z^>YVIQwG?fE!Z}Q-H}M6_2Y-Zdw2xfWp)X_6hL7q*a^n+@=u32&K&6gj3Xi!PpC5J zIrrng-S@|gKDZeGfQ1!y9LykgTRr6Hk{I414or}$9ulGILFFmgvIw4N6m^zUr4q!w zwc1T^D17-ASpGjAzio_`KsTD#W)o1EKT*b`0j(m`t}P|Y#NGI}qHOb7(6P!WD+m^9 z0EqdWKJl*yZc!yLtR4b)NFEsA0%Fl7bBRZ%4)S7wTs_rk6{faf&vKgsb&VUrff`<7 zAIQQKFfdt~H8|%1ou$AkWI3_SlD;!Ethv)Meu87iI4vVSeK4UG(gAc7YqpG@fIVK# zZ37?PyQz0n7cYtne64#-9n^H@R@jUYs<>+oC^nx?ULeplS|{`cwxu zh)P}&`OPCwhfT8;1p^MbiMk%>y?V{J#%11NYAM)f1=X|JR?YuS%s{V!RsG3J{0_08 zitAVoKz`9ezG&dtTg9TMxer6R@po#)*MI#!QG~P57?Z|+FdJ?o?dqeZ8NTz|ho9(V zw?%rYiobg6C-(;i!IKHf-J1`DV3t+h*m|yR?>q*f=1DwXA5Z^L)WFE+3SjTIwa=hH4>>lz2F{bRodxO=p5d?0-ooRTfI|5>(9i*`n$K(( zm*q^15lNew7TBcj{O)?0aB_6AUo_zhr7twWhiE{~+%F zUP8#m;%4{{r|AVyhGJYW6KQ-8=4V@iY*1b-M{x3GZ|*&hIp z!=RLl3I65FV5Om&Eefm6{1?TI4&oRoI!rz^%}%cc)M6V8d#P9=IpXP4<$u_rQ{J_*!<4&JIkkD_VufEc3qp=!buTHs&=9E*N4Mul^X!8N_aE4&+Tht%#er zhZQTs``s5KAkN(>tL*u?OvYpR#N|80r}1=X7oP!}H}JT{VcLpnQP^JRe#X+d#z{Q! zow)`_bORV8!(#y~ww772p;VK2z~e+)D)G{@XasCuz|FmYFFpI%w%Fj@D{oe%Mr|An zI2?|55KZF@u^L;@d_by*+!N%Q&4yA@_82>Rb%7;`14)4wU&$_(YdljRE#G%l{}JBy z+)EY6i3i-dD7uLo6=~sE#WM>mNPkIz;FlsJU9R8c;ANDRjmx>jGO3NY(aVy16ySP0$BCn{s zKAw}IOuP#TBRpu`YSYe=BNUdS*TL$w`)$|+>^p$R_WbmRJ7Nj{?9oXmJj6|4qMRy+ z`JfU|h%EbU*jI_B@wVfl=0l9DEkkWf17q{<^0lnA>N1r(PR*nE$Ky}KjIjk{5kD2y9&4B-+jsW$QY*-QwuT0d3k^&- zVBi#TQN1RvA&3J}sjbphhhkK7zj$3$vUbfTE0>`NXFxxG&ir?mp$%`86*qEC;0M90 z1pHP3-1fl~GXOM$oEFpybVdkhtKJ7c|BK$mM##zlj#V4b+zc3ie@Ft(b`|d26-243AMQnzs$>jp8P>mS5Y3sPj@-5>&JV4yAz%sM@#KDT-Uyc4w z)ZMh}9T=)1(43*jvWs_rpb9t9l#+!-HJEpyu7CKbL;7JWG$3jZ%yJBI@=Kx0j-gJE z68BMV|LHw2=RjlrVDJBgWq%YoFmC*J3{dCha$8IJ%&WgFNV;}PyVCONI5jt`rxWsK z^z*o)E6DsGKQtyp!r(pyj7NJZ^YNc(o3HQjWre5_6AjMb{0;+u zK3Tx|6=^fFq-IW;ezm9f=CjDf!e`i}zyd2-y(#r@==vXEszEImfai<0z64naV)Tz< zdlgnDz3MdVmTzA>sa>Py6>Li>t7)3DcbMv5tX)}N!T_mmt6QFpAG2TX7zEK04#wvv za;#2*HbFI6Bj-=9KmnM_HHe-%oX!r94YB$-rfHEz(m_noxb8Xk3>QYv;p1n)1KD>+p+cg$!nzC|!8~qkNahZNGsyhc ywd4w(a=_Wj3qpOQQ#fihrKwBih>ut!}mA6WZXOKy+{)-%HFUiqB+K!-(z0Hd9o-az}}0T175)*CioS5 znG|uBkC~c$CeF{#|18c#oQa}rI)7q0|96$-d~ntqs|h2F>TUl}kBsHo>?a%MNWmP? zD1ZfGHFaqsh@hv#-Xuv4s(^_>i>RCd`y!8b6x3c#>A~(O_c{VYe!@9tDmW^9X?x)!_5oXQ$r_1TzvT4D}8E2Y1i5Rh06IN7l z%!^`Dr9<$w$kI#f##K_zVvr3d(n3;XznDOIPl#8D+?>eita?a+_r$kJ#eHU3d zWC=!|iFp;z*aa_3o?{xT3a@aMH%Xc8BcqVyT3$6SC zncbRSD`szzJWEL)$sHZY5!*jt)g@5*JW5i@p9M7X3ffdJpn9+XG5qiH*C@{Bav7;$ z^#nqqs1{Iq9_PH=-Fw(VMa~|wdIpgC&{C*97>ji^3d>ZvfMnnF%Ik$>-TU{wcX>8X z3J!utKVpIRy^}Hr=kWXI-iHq#pb?8GkLF4tw4ITdz0FTaTrtqqfm4XTVnarvi6JB? zV>Y3m=+go!6(cEGLV~6y3?ZmBwd~`(D$0+LhcmIrv&&=*k-%Dnxko{Ru*COvcvG9h z8dea+y3@yN$TE>$!>Vzt$dXBe9lMGOwizlPZn0ySf^9C7w&CvAH~>M-S*xYZ)w&Zl zU_z{fQh|G!;KPOp2=SEA7TU}K@|^otZVfK_f_AXBQ=nl@C3F_U08Tl3z>*OkNoSQ~RR&?q z`8>M>1p3{^90Kmuh)0<*Udx_HJ*XI*!MB8I{qoGXA;QaOE+*K9^EbD0={d zE{HOjK%&?bhvmM^A^L5yH`F2o_LWbmlXYU zdSV-3UlZ7v0If!Tv&&Gu3ltEkiK-#GfLwrSb!$i_?8Oy|GI-OpKYG*%NPAzG5FfV8 z4N;wT81jZ4GS~wnmr}B~YLFI%nnukaOz1SI4p?Pc+xE;>c3Ih$h2OBY?Y%Qj$ArmL5{c4lEdAasj0#4aFElzX5A* z*y$Rp{l^=#A}ofYN>eP{DTHN$+#@7-4Q=p7^CV3XWq_bD)UJfpP7uG&c$AkH2q)q8 z<4?q&VwP2~;fMkYmDvQu^G!t#twsrUcBzxCcdc3Lm1a2r=#2|?xqC+@xEa-K+K>@% z$QcWSwAZ`@(v*$0Jg(WJmE`!2clTh!ZFKyvQORSZbBMHmg-)fmPPW=z!k-};M`|H6 zPZ?wwheM=Dbu>8xxeK^kTA^q{lH;S3QwsLmzQR~b7mE&U-GR|6cif?Hw8P#yD(p_{ zD=aM$kXYllM?OM~`2unY^_*gV%NYVL7Zi0N#FH5kWleFFOMeV@S6*1*PLzUT+phhG z%~rc3H|57hdfcf#E)M-^nq5TcZPzawiju1O>xmjB?FrC>Nwr#2j zAPmw(nMlvu6ZnjE%!XOooqs}30057P37oo5*qV%LH zM#o1l-oANr^y2i@n_oO<3^dT?uBk(%RdL)D9Xk{7sHow zm`b4IhAcZ7X&SxixdNzkK#f5?Tm3UqeS_^Y!A96&G1z9PjO!B(YK)^Yo(&)hIM?7* zMc@8`Mo>kb=Q$2;;A&kn@zBa?^eX;2kjt5{tiSUs*P6}Ph*s&kGs@L-`ZBrJ{FVQ^ zyd`T`i39;2d-bxmf-9IDknxkcwjLDlJ*#@L24A`)S{`Rm&CU{PyUnG{l50|6Q$SY1 zI)c3Vz)*v9_tHYSS!0EqTS1uwspP{G{RSAyEn<9ndZG)DhNf1#OVj82`8X!q+nL~M?7saZAI|+(A4)&!LjE^`o~%| zmh9$^Eb&aDn3MNjQ%hf~EeL68b8@4J#u#@~NkVlWc^qOm#;jB{(v*ab3+H6NDI4&K z^cmJ|FB;kCPwCLT@f-S=i!YfC>VRoQk&Cde=wwtUS_m|Ji5%`Mya>K&A^UMv%bxek@HFx8i<*}hrn)>Gwg;8gk0~FD4EQO;2o^M+*XIo9I z64&Z8%78M+Np!?<0uxls46b&Qi!Tl~fE-;dQpl>A?6+*1d4@~&w{?P#Q4S*GIF$#u zg#XqTHub{5noBqT;o>IGzGWIiQZcYWx&G0maH#YQ_Xm zmR+@3@5mVUp6)d{m;%2n&**S=-aT})@>>LsGBIC9J7CAsI@jt zbh*uyyghSRVlTZy{?_z>Hbmns{>yCB1`2Y%`N5u%*7fsKn~Qhn3T>#^n}B-#KQdK` zg}SZ-By7cM8kgvm8bj8jzWKAH7Gu&>Yta?T(+U)=seZoDpzr2@Aj_oynckOXrPk_g zb)sd#hp#Oyb#2(UBon)2l`=Y$Olzyx(fPU}g|t#9g}w`I^l4*F-}N1j0<~0iIvlA< z{I#l^23JWO_o)Y2K`*4=l`E6b>cLB~3k1D-TAu<@V~O-H7q_E2R;|kr(*Dewnuf)B z4YjSTDngZkXb1`}cPnrs!eFo^4`#8qxU)>bou1;ZfF&C=MQzJVmgW{ zq{R7(5|hjGUF$}uCUgbY*NlY?*Vc}PHF;pPyH|BM93mfsSL#Cd)gq1LCd!F(cU^lN z=t44`t0NeWRjHSb#Oa1HEP1KIzvleJuw*65zG^%*VWWn!beB3b_Z^P^6M35d776GT z&Y5w;wQ+eJz3yH(I*t3#8Xm(9Tm?|x7mDPiUAi)&%naQ z0q$uEwrE7w-6dKaEnaq0Z~&peRDz?&EqK&|pK5#01o{TlHFEG9Y(0PW=Hu(5*UyiR zPf(U%H#lE&P70JSaDXb1#TLD}x@A1YZM_xK&dyL^CVZT!?PI##15*zqGFR+N*uJ-J zWVK(DIIMLyNLp~JpX(Zi87dE)aUT%8UuhJrCn5avB28lH<=vHVlSyi(bz4nJfqjL^ zS{+(#feK*Y(cSGzh_n5$CTrGYSuHM2*hfK{jjAIT_`^FEdJb4WJs86BK*SK2W%NQLj#4~HvW6?m zr18QLEiDJDRg|cZ*1Dp5otGL-NMWJfwq9?ma#5AVA^VjMFjb&9#VeaUO4U0zG6py( z9-LbPzPpK4AcHVcKc8D0&Xxsdi~S9!pEWG?=*>FQus6hJ_==;AJ?o*I4Pu2Pgl$^0 z%l@7C&Vq^fvJki8sT^L0(+(a3Lys=60qq!(UD{>mD)L6kJ=mWM6 zc?j5rXL&BK_2@@}?;3aL5K-5)++5+YSB2G*xs>-E#zW_~TD|lympP8PkYSdIJlgib z6ozQ%Qj`Lr2hF*MQjn&*6?A;70oe~(P1;n8Wjpp*mO9pHOR}8d-1q^|2 z{9IMPgUbc-Bt)AC6A*c=OH^J*2+o1Z(h$Lz0DF-YreKp8!3Jyltgk&tu<`yDCD@;- zD4dI%cNHbr{Qf$_1RFz0M8G`UbDV$>y}6TSJwT`U%f8cQ>`I`=wJq|wAYE~jQI!4! z3&L~U=aL`JC;|F`4zwPm$tUxD3@qXq$L28FUv-JGaqrjxpnG}Ahjb6oh>t?sRD3&~ zazC+gFOdmF)S&{WzkU6=s#9APUaQ4bj%RonvXCbd5gwW87ZdepS;|%q157UB-3am* z4;vLMf)4-tB>H@y%}iJ8c1`x-uePSzdASJqNQQ6BCzgewfXTT(W2GogyURfOo`5nY zcwC^q3xsfUN>9Th^%Wicp#}9kPgWB7;hFd=duDfA4X<9RADS(wGg^SDo~E~liVHaO z!KGq?C39jn$gYs(*9C+r-NvG$h=7^b@gWl6A-*AF$At9TY>6Hq!2?qG+Piu8s&2O0 zA6aN^k-CiPlhnctbR`G=Gz)3y{{o1B!4NH>-zAmqJTi>DE%;KnB3-Kz@ zvpK62kN~Ij*J?CpWTedof8wdUDIe1X0s0sX!##6)st;>!_MnijkCes76Siggsc?A4XN(7Ebi_bm%E8Dez^S)`}M6L diff --git a/docs/generator/config.json b/docs/generator/config.json index e6c07de1b..cab50ffd4 100644 --- a/docs/generator/config.json +++ b/docs/generator/config.json @@ -1,4 +1,4 @@ { "GEN_VERSION": 10, - "COMPRESS": false + "COMPRESS": true } \ No newline at end of file diff --git a/docs/generator/generator.js b/docs/generator/generator.js index 4c925576d..0c478522c 100644 --- a/docs/generator/generator.js +++ b/docs/generator/generator.js @@ -11,10 +11,13 @@ const docScanner = new DocumentationScanner(this); function parseDocs(json) { console.log(`${json.length} items found`); const documentation = new Documentation(json); + console.log('serializing'); let output = JSON.stringify(documentation.serialize(), null, 0); if (compress) { + console.log('compressing'); output = zlib.deflateSync(output).toString('utf8'); } + console.log('writing to docs.json'); fs.writeFileSync('./docs/docs.json', output); } diff --git a/docs/generator/types/DocumentedClass.js b/docs/generator/types/DocumentedClass.js index d20ebeaa1..323afafba 100644 --- a/docs/generator/types/DocumentedClass.js +++ b/docs/generator/types/DocumentedClass.js @@ -37,19 +37,19 @@ class DocumentedClass extends DocumentedItem { this.classConstructor = item; } else if (item instanceof DocumentedFunction) { if (this.methods.get(item.directData.name)) { - throw new Error(`Doc ${this.directData.name} already has method ${item.name}`); + throw new Error(`Doc ${this.directData.name} already has method ${item.directData.name}`); } - this.methods.set(item.name, item); + this.methods.set(item.directData.name, item); } else if (item instanceof DocumentedMember) { if (this.props.get(item.directData.name)) { - throw new Error(`Doc ${this.directData.name} already has prop ${item.name}`); + throw new Error(`Doc ${this.directData.name} already has prop ${item.directData.name}`); } - this.props.set(item.name, item); + this.props.set(item.directData.name, item); } else if (item instanceof DocumentedEvent) { - if (this.props.get(item.directData.name)) { - throw new Error(`Doc ${this.directData.name} already has event ${item.name}`); + if (this.events.get(item.directData.name)) { + throw new Error(`Doc ${this.directData.name} already has event ${item.directData.name}`); } - this.events.set(item.name, item); + this.events.set(item.directData.name, item); } } diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 39aedae19..0e077cf55 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -52,10 +52,6 @@ class WebSocketManager { * @returns {null} */ connect(gateway) { - /** - * The status of the Client's connection, a type of Constants.Status - * @type {Number} - */ this.status = Constants.Status.CONNECTING; /** * The WebSocket connection to the gateway From 73b61b6b4e37b68325d30e29ee70bbca5e71e1de Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 21 Aug 2016 18:05:50 +0100 Subject: [PATCH 124/324] uncompress docs --- docs/docs.json | Bin 24030 -> 96486 bytes docs/generator/config.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 25fe4975284f8f5e6856e5420b4198f999617405..361d73ae62208cb0435edbe1781369a9ff5f4f9f 100644 GIT binary patch literal 96486 zcmeHw3v(Q|vF=})kf|c&OHn5EvJ~4DS&|doSh7l_bLy1o3WvKxa;@E2o_&bs(ba#y zUpE>+1B02J8LmVpRw}l+00uxm&}eiw8t*qI#UkH${C?wIF`JL3<;LT^FLySE`J%vI z_a5#&eDrAV{@q7+?|#_X7>x7zyqIr1{`vjJXt?osjWVC0z5hKd=7ZVj zV!<75Je?KjZ=U5@SzKn%M)SdRHq6Y&N9FPH@vrlvaxg9D3s?C~HY@&TIhqyQM;k-) z!7f^D-1>`cIpDFgZ*-r#rq69^g>Er13*C5B5P|WA2%kd8II-ic;ff|>i#W}al2ZQOd zTx{XX>DvNde0`bE%5U-A)pWTvE3!%cc2u5$d?(YzPBuczqjItwoM$J+Vo}WSS+<-P zraqJ2vKf#{b?14B8r08h)$URG-E?7p&9n3TU6GxS&Zs%QDzfotGFpIL%Au)4mzX^b zGoMb1>=fLz1QeA+=2)YYO({E8Vo=P|11C69ZV-Y3@Wv6@_7zvl5*Beq(WU!KnNB=Z)91>0~r70PybD z7~toPgT)M(!|!i5e);7WtcZ(zmQT!r5IMs$`*C(i?23lr8aM>|8#GLbHPM6^Wtg4P zPt*y6^1>J`vJo+w`Ctc(YN5^kHCfIV{{lZ8l^3(=yU`FVfw5@j5d?0+Jl_vH@2xnr zeI=)8E8}_XWYcnd1*ukG#B6lxW|v*&^Q_xce)#~3;S-Q~F{%pgO)MfMz2#RGn{S>U z96|_``59IfR*n}ifNWC4LM(|S>f@#90v`!w&BBKGyO@pM(UueQ*WLZL>_uo-;&~H0 zSnkIYz6lGffKq)7sM%8518Uko3x;nEZtMLi23M$qX$q*mpbDncSyJ|c&?C1kbocJ{ zCFUjV(gGO&U4`ktij#xs;BB$UWMX}xa~*XD@P2Dy7?V#n<(UUll~jQx?#kYnjohus zeq^MsY)=@yEiLaq=u69dKw6<9s4u7j`h*)_m!zhbd3S<7=q-L|`&BU7pCN=#AZso{ zK7|rChq4LDZ$D`%Uti`IAYZ(N?qs~B{)E|})^4bwQv9H|&^cR<#?VyV(saK&fa$(j z2b_PS3DpAn@NQq89YBdKi?IS#m2?1BeYFm7pPFga1KgXktTuVV+Mgk)q-fIU(XS3i*}t5HO4xER0cO)^$_J!JN06*R8FF^=^(oQt3UPs?J*>7o6>Yo^(w z-ZZnSvWHHUQ~|V=HvwaN@5u ziEeP@&g26k^OE}-X1B9q_iQ(#9=ZAq)L%?5Mg#d(w@gD;y}RedsS!kGt~EB5J9eM{ z5Gy|hUfu|PD)Vw=UFi>7R7Y{f61q)H^pT7E`~g+S_!(@S+a2fvkKYV7!^2G&WHux zj-Vs+K{mAkg#?bF)DyW5tZ$~{!k7dj8V40C;WQ+kp)&#uMhvWzmXN7qCDYFjd|kK< zCnVr<6&>LkGHbPj>)ykVFA1*e^CtCTmNw~DB8M3JVNFNKL>jeQad-WB!%=Jv;wBQV z43y~>khX-UQLwgz&TktG-L)Wtz?(yoIWUA^aq&v%zXMp?LONVie5(~Cyp<}C~w7q0*(&z>5sqqFqaHfz&` znMw^9cP@*QIh&U5T;yb7n%}`!!!aH3n;~>EKZMW~cY(0eK2U|Qc^BvoA+zImdHG}* z?+LDOC3K>wKzPW3V6MCau*e}Tu5cx+JU3dF!nAkB#cA!?Kh!z*I%(ED`PL}1^QY&_@@=HiL{%$69Z(;% zcNmxrOV0`RSurR^?+RKTrd0cRV|&K_{ZMh!(^wyEWk>fQ`+}8#Ds5n3RP9!PDSFCo zziwG86LZ`tEE^Yh0Z`bsCxB)q>!X^nJ`E}gU8Q^_h@`!UuEsVW(RoHQEL75gP&kA6 zIiF#RgBAKByBOzJ#*2MM0Um8Q`GMDYUbETEPJDd`VQFMm$dejtLA7=za?B!iCIe@O zAp2#Wjq}-AVHSBSG(7a`(#JvrJkg-d0g($+61EQuR|3r(VJM!NPYt-Di?ssvzTbln z{gl>6ZVS?s92^mtT-FxK=>=j)c!u49eBfPs9|g#F)6t*+EfclO@8m?ko}9ga5YE!0viR|7Qfl`d9!P&hW}p-~Oz}1Ka71 zb>6LL{)$X~%wa7H$mz|oq}N$L4ws`dx2ztx~lC^mII& zfF$0*YV6z6fE+?cwjKH~1WWjZBq#R0IBYF!k2XAHBl}vk^D4j>PG&LQZD}|)g?Mfd zPEl-7!d8shD4eVj^_2h(-MTaCEdaH+Ka==^5JEzJ0<>oAM;~-YzY%w7BDlJ6qA@8< zvm`-GRbR5G?Q#t(f>Gr_>OmYP8&m=W0u!w!>}#VlI#w5j0t1PO^-)J5AKzKK6sf|D z=Lg}Tc_!)MuCW}y%jd;|dlgo2#kE{uTEq-MrP+gf*=Pbc0(v$0QsxW2$hclh!#%n` z5QGHl=AGAM98*vgh(i~_CT`;pT%!1iKs4h`fTcb{+YwNU{gbsOmS1VQ#5h8$_JUGO z)c7V8mA*WjtXiScBqoj&_g$HLch^cC4@d2?92gV3hXcq6fhGz`E9hoK3cD|xU&Mon z^(kWq9k-{9a7)``+-k21)5=QA>?E2iN=ACy8Mi zb)khBIOx`rB91`UaWAo|>?1S-E!h``R59f^_<(`x!|X7hzlBlD zM64V90^rc%94l`!Sc9Nyud+&Cn{v=QoVvplrXe6E>q0o6nscH7)PO-;M_}s?E3D`7 z7J|I*jqIkk)i9@Z)p9u=1Cm;9OUDh;yc2PQ=qRzuLzbqaRk&dBRfw$9Wod$jNw6j3(1#~8e zsFa8JIDo?vkzbHpZ}IKzoIb`G5Y~Zr`Iy*;Ju!T0bRgusE>Uis(xBq@* z-Wst*Is}$j%fSZ2?PN3_<8l!I8bWq2zzic?TRShH_njbK2nrxObhG*SbU7ZvT!LsY zzR;N9#8*o?nE)4ck}Wv(yQLppksR3H;lvLyaf2_A0uwVA1{WiWX+jB@RwFz*BKfMs zv`w#e+OhQ8^X9vD!pq zA5yIXepg9I7pgd3k-|3pN_~UNs<=z_cM})jVXu^jfIl&sDc`H*_*-w*Ay9bh@;4&M zC}SfJT(mCV&B9g2szt_Y7U3*vcD6e+0B|R43UgLF3r+ah=EZV;?vWtBLeO8M31kx4 z<3-1SX!$W;xj}UXQ3iwx6!Z(ZPdE9R*W)t3&b2wFp^!2^{M^KpQx&;kuZqrPtcPxaG?$uzr zbIPk>PoZ-AeCMb@3=m-Z`FL7PIOuuB>SuZQbZZ$qEpr%Q+=BBAS4NZH}{k z=GtZDZl$1T!# zAOi&5EHgTT^nr2JUQ{a|J$>)L9&=Q~;Qkw`b_ zq!+j!k2E(X8oH~bONfLO>VS&T^pJLwhE9$29Ykw-0dvhW30fGa{i0GHBJL1kkD9oE z2gEQS>(FI^twRz?VgH4PiFOcJd`V1>rvq5FaP#j1JJZZo?`BW3i|HH$gZ-;yTMj&d zIqpHYZzze5`-n${Dv-l60j=!R4`()Mr_k4d46aDfqS+p?@2zLP+jW!TCQdybnvgHj zNVCjj{fRX;=Y09{zY8&rkF3;2PY^A3qzz>2E+ouI;K-UJ{5L^ z5vPP11cnk4VM~}{5VJ~tFCVu|IE&P-m`D{qee@|;|0-O)DlT7`=v@`Z&Ik)@(pV$! zferqJS%l08IDU;m14z$CA^r{gJSi`47T zmW9}>EJTl+NCJ{6c0m0Oflzpf;Wf?{Fu_7jI?S=eG&@sQPTW&!{mmm#BDt|%Gzxub z0}_!O(OlUlgaI>r!O`A-Kt~aWKwpR`LV!cbrPZ7=X?y+c$Jz}w(QH{blYs9jw<%d1 zv*`d{JeBp=p-hPkSidVbNjmOOdnzQ`4RL*{)F@pI!eVe<4BoyteG^_Cib^Yp!xmJs zv(`q2h_m4M&GRSE{`;6D!n}YbR)>_C#ef@16r=zFf-4rBRu&gD!8--#ATBc70}HXv zy#7g*t_G|^D!#Gzmb?UsN<*wxSxSl09dl2ITq(4G=$6`&J<~W4;0MxU?NVgla=!cK z`O_a?y?Xxi@WrdYbw=MKZ&&#gOo;=Zk!oSq-FWCtvz>T6y5A87ftjZqH)OQjYH(28 z^U6h=kVj?&e3|qaDz|DpSPLD%*$3lqH_bY$9D(EF5Ftp4gqtS_D^JQ<%W7bQ?79@!VqtjWYH zhSi`mcM-f7O2SioY@kq=XJd+8k8jvTuFdRoUs6SgS!~b);6HaLVR^G|bTo6wJ%2Z0 zt?2L;8Bv~mK@}O+M3WDP*t?C-ncX&SN=ji`H-4JgMa9;-$+TCk>Q_*w^xA%{M2Dz8 z($#^1kCT#B-Me>fJAjQ{0uUAcr)P!YxV#4zi~0&jDWJ}c`O zW+}WUV(tpFJc#bPV)H_(;Z2i+#81)v4rgeRjTj%+zCmWR=0mu@ z%pbd^Zu{0zneAc&Ew^uFc#T5B=BW@yh{5?bSOK?n3VONX)?cUv{xGMF>Pr!KeaJ;S z%%o3emGBA=pA83d=e61>K>4PN`eih;r1}NjtQql%opOb)<>g=-T)Bm9;o^vW5q11` z$TOraEXxt1v@*2?c7~x@R_*&RyjC#OtW@5G=xU^22?lpk7DA@hE9recm!BaYxq{{K zA^AM?7pN(_aaXKg6kn9| zNGf-!$xa)MLOvjN)}W$6Lac;KvT~LGC*Y7+@HssngdRjhsFHBd7i8rCPH9$z+dMnk zm>1(ydRggcgCbfz8`|fNO3E!U=1;KPY+k8tbMeMsv*7^BVt8wZ-k9PTNa77Z38v%6 zjVPEh(zt_#pWrP1u)2Pg@;i(}NqA zO?K+F%%mFh=O<)zLq@ZJn_N-IO9!$w;((4XYBxr7rHnp)6{0*LLriBCVw)*!pU!tF z82Nkn)DEu7!S>ef9rMBNMR_LFgbXXUSz^Y!713WNOVsbOGd=8~nyhzcG83<*y{k@8 zzI6r#-k%mzw~NXCq)I{#KvX3h$J3G`#Y_BycMs@ILwiSm$LwCXYCNTMM+gdp+M}AA zQxgq}ooYf?7I3g5+o}Zo(Vk1S5@FC`H^R0!f1Lfj7>}pMJNETo@xb1_`wt#|_2}C_ zfxEO4qna7z$m+_R_ChbBN@U zkZktMnrF{m+Ot!(4YvthmneS2m7@7A7vxDqFvGa`PKL-nf2BNHa?T(JjKAUCM70>d zYQ`(@tK2cY@mo2{K6@z;0EZP7(fec+(xIs5`c)$LJ4EV4PM<(dM`@*>G~) zOTx~G2N4lKg8*3aSvj402WP|`j>MSZ&J$MIbhcyNG&bOtl7oU^bn2jsGq~t=RH82^ zPUJnGU}@1)h8RhD&v@w3;wn42!a(%hG0kdsG|ayF<{KV+A3u(9Ohux&IqQfvS&Qw1 zjQifn(uK?pODl-1f^B*exrH~GAWzCwCX~k-+9ZT4%?vfXM(Y&*a_GJLPUqK!A-hnl z4uq(6^AX#xZM)>(@4m13RosE{eu_shT0=Pq> zK%C?msWX0R4hu~1OeopOd?Z{kz_wB6*Qh+4JQ#=Ac>&7ZUQBNzA!30X5EIB1q_-k) zuEpJ$knJnva6i+oOum2{PNugWM)y-$&Fd%qr&nZ3INogg&3rOJdPiWe=(~7zmv9 zX9(mW#0A%wLzxE=?AHOHP)xC5m0zltgrmx#;O5uBqLnnf1pg-Ou?&loCaR3)X*(qi&7BdBm%b#2$SobFzecrXcjl9?YN92LnYhij4!*>^Q> zg9^>MOFI=x(2F=O(ng5meuqF2aZHt!2t=UAN99rZMfSxP$MC4&=KAp$Umy=P)zF#9 zl-UNSr->G(P@0VJ)KJ*NlkfkrPNAcW)V**eZ$k*Cd`je78l+BIY{(N6JJ~UX zc-lzes|<(GatjH%f)^;7PI(C)Y2HB8?V#0Qr`?nK#4h0Lq7VnlISI?h2uEYQRW4en zoF=^0<8sOvl1mRd!a&{Qa$_~_6G8e18AyCzp`X%qx2Y^{0+uQXp<0U#4!9U0KY6*R zHN+j2uocMxGHs7@v*)FuF{Tm)xJD~5mOib;{FJbWxdDRXjN8k?V`qp-Ij6Kbn7Cm8 z?C<#09crMTkI|5OH*}1448we>&Nl&T2IWca>~o5CW7je(#>81)Ospi_PiRWB_4da!=*hyYjO1p@bu7q!4*=ZNkxdIMH$Rr%= ziR$E+H9VQ@&yY&NafzE`+noOG0GX?c*)0-L63uD&R;&Cfa|eIgi0wqkCV%wFk3l>t zjzF}s<3I$10h8+>TBlqEbVdh(N)Q5~CAn#10KyqPabqG7b~a2%cNoghqL;1g|76?` z{<{U=9tSf->tEd`<4LWcQ11g7cfR>{G*B0Yl>k@5jY|HT(vx|ho@DCFY0}rA3 zcCv&I`xL4xFh^lHWLL(EkFYyml1jrP5?ZmD6qUrw3=WVOiDYFEm;iiL|ytaoZv!IKoN!oea0!89^i&_~k1*XoRz`yiU(8 zdf{x;qW*QL#gsLtIYw&gFg}6Ax!c+c;HZQtuARk*HW*|)CB~m`jDAElX zjr^JYjCnhl#`YGCc2<;FBIB){Y>U27F+l?pIaIm-VP-qzx!N{=elLH8+apO$cULWO z^+O%b`V&%bhuav$M7anSfw%w1W&BRAFT@=PF1E=$?18DeaF~Bndn8rZ6FOm1Fi;~X zLlvJkM_CvwR8##^MWTN^8j5&ZNT6e)*D+lPIp)`fkK2vx4M~jhO~VuPd@FDza|+6u zc$Hsw)w?b3ymLaSa(anP1OgKOXDOR!C*!<)%kRIo+mg*Bgqvv~tHt@*DccjzBvQnV zpYp;okIq7aqc+_b^xj9&*WMUpuVTTNQv7tZCzAac(I>|aWP+^C>6j!tH|?qtnU9bR zkVJ>YJr^pppH;-e55=juJ;&bx>u23izLpJ9%LHEM%EF4(n!&YH&NjH4X@vT@~$Wx+tFUu+O?@~`cd>Z z18-Z=(3SKuFGYM)(rL@Rr~Cqjv4163$3?z4$1@T0+2GDRNS~253tpf6X6m&JAg~Gz z46CDYf(71K0@p76e{%4!$?Ew7F5HI~vs1M-jA5dNO-E3((34f!4JI+c&LX1Pr(&4O z+_v|+GEKFA60uf#=vqciH(pX%H*b=cDp1t2m2MeQu!+U~nP8w=ZbRsxKY6l{!?G$C zL2(U#p^ZIQUZ1g4XNsfzG`8gk+m)eIznYWs)3*Y4Hx^Q1q&LYze)_e%qX2JGMg$8j z?4*V(4)ONJbg4pnunxX^!)mUVOmaC`RCM zw;8UvxXb20fB8#$!QrWIX2@bgjzzm%v`Zcr;`468L)|kr;NFbR%OKP;hk-dhbtE)i z2H_=pfZOdd2Z-_4&jmwdxS|S^1Tw-j%YK-iO?$D(oJUqXQYS1-!~WvJeBVi6sEoxo z$rNVhwOnDUGu+#vdy6g3Lk+S6CZP*X1s^6&X6U=5>a(_Heh);f?zDDI)?~aNCex%c zgIa)>*k%&E-5lhlE`+TnSu!Re2>~j5=Cf5n5@ZoBuKWIKbZ1s+5oh{SoI8{U*`ag9>2k~wFD8&>G{*^|JyfB&lw`6F z=~O9=Is@f)F?$HHDo03O5}CM!e{Oe(Gj@8&9ygkRL_7S9H!dntGMy4{L2yUe_CH^| zrhA=Nw_0x{&A{$G^4D=YL+gx}0zB?!O!%3Cb@w|<(h!m|I+8P?FxF+YegFQK7T)%2X@xl4-@674f1Qp> zc<&ULsw9Mz#0R{DMFxe;Yt5BLM+dm5tOikcohbR8fQ-;t_XLwg;|RAnvQnqn*J!MIam}Tz895m4r0JdxH6F zh8OCfVH<9>P1{2fz0c~N8B8lL``0-(6qD(%Bc<87->aZ94L=@C*I03Z5mQ()C<|dD z#*7V{@@SKoHo=Yjv;`I&WX;h=PA?Gh>)JRUolNuD@MxnwCRWJPP9B3;7j<3=eVGlg z%h{mjJrjSIjf3x;ljf4wA~^=ko&$vwYjZMvR~rzVIO(lemiMkfXtEIvpO+K?t==z< zN<(7X&4e3KQbE?r3}8qBN6E&nJE&s?iR2zQE0amVHqMMjiZ}g zkx}CGIWFGF<>M9ceHaF}kU4RnMU@F53sabAU^d;&4ogj&Ej5HuXGf*2LSoHHFNHRf z&FN%8D+y+^>BVTUlU+>bP|Qj3p^l;cV0B*3MhnEc5&|HO@u|HfBHisGBWh``W$;V4 z^dQ%qGtp(owuxN#ke}wl2R}tRoT9n8{j?xLral z_a3g1gVLdP9#i(rQ{^S5QHqlsq;z$T=yJwpI6-ZiUqUUlP9%U1uSIqTOri?w7{$u` zkHIXq?|@b*yi>p{rdOXT!t7&~{6E~FCi2r-Rq;Aqr> zaYB8#fpHFL?+>`fmV}e>vW2w;HAc`rA#2R+ zWB%dNPRz6awF{>;M@ujL#A?AqmxN}4A-k}3(=1_#^gKV_kI3)ChTxaKpid-|Xx-12>W8vP_)DFs zTn78G?Nb2hC7{BsL}@`$_`ZzcQ$z`g&Go1XtC=fNMzs{YpiOHP!}QAAp?vKHfT>d# zviiK%_#cw|O7rn1E0#_hlwaYxJH*~W71npuUQ8#n)^Ib4E%b57LmMUy4TP5EtT1yz z#cWLp$Y|3_f@bqo7-KyiUTHpqB!G?ANqE?dZ>#nP*6!+9EdsA9se)`PE!47FOmqyq zF?e03GpNmURj=}D?rRi2X}U6e4ovw~1(7N&c-P|BW)j|yE*$qKVVsUl=olAQA@!DR z&eA67ax5){w9Lx%bkHTtE|kcvGksU!p@#yKrmsKx{^(3bimlxlJg5z^@`O22iU){INP|Gy?%;p)n8Za}F^Y&**8&Wa329h12etO>nh}ccZVb~EoMhw15YnPG3 zrp2b1gpSmI51jm}!scCh44MJe(28w}d5KFjURmo1=}%1|9BU#YhQI;qS& zl3YA5#-}l;uA~*9)WdCtwj=MZAZKg|>QBz`Y0SK?q&PZB*!WqV2ebA zh7NbEl!pM5@HJtM$Sp_Ty2sJn>4ObICNpN2wHofE@e%WWWCgkw*kU87fUV2xz#d45 zfwhf&T(BQRM!>#ctDt$2$Eu_XDu>Z)aU2KDcjW1&$oU6rqAZ)){C;D9hQN9Iow3Tf z+nf2t1uRVbN;bpI3W33PM_40s-J7PHa}T3<&%Wd(Vd_DbUm@f*n=FfAvgl&L!h%cb zY$tVgl7w2gLL$f6#QMTVqSV7Dzgod(h44oMaqr9S*01Eg%2HJ%kcTxY4Po}e*h(e6 zW+9nI2$IB2x$eUFpVQGm*!^9+w)QcLt3bj$vCufw#jk8NwSLL&|LAgLOa^EBW`xrOa=^gbFv6xr8 znUf-TAaP>O*CzTOx_P-64RBo!vgE?$5#XD+IwH}=o7#_&Fdg|DDNWJfyclroCPjVH z`P=uxcU!Y#`DRxFb>$}q>h8#mFWQYMH9OyED^5>G1A5kwZsU)T_Z`|lY|a@5m|o5^ zniik!5vp-YBf=R=H#CN$(^LG7Qx+{CYX(5FWx6jhM=0=Okq^%KA$5cxPw6y9v8D8E zxSw+51bgXh5#b4BPhD$}HY+HbHZ)h{urn$1d9hWGPOxKh_VjL_q&x~kjcE782Opx=ar9)xgO7o%+KU0 zl1?FBdn$FS%(xd1Rh$(b{Pww$<(o~)bqeYUU&ybJ@mxwxYiMIV=j(Gtw^2V0(+i00m`Eu1wB)WBtPuImpdxlJKU;rSngvM!7Eil$Ipu`_%Mv3s}Ib zEMSty6yuo!KfOr9Jr|LkHTh*M!-xjsdBzunY(w(Ot2=A}^a9MrAV6@}aZo~_Jatz# z(u$71de(+MPP?<9u?5cqW`BlYA!7w0d1Cn01yj%tBniMNZwz>sucRP79JS`I>b~oM z09Jd@J`KKCaC?DoOwt~H_d7%Y)74zjPDc*N;2pqfHd?Dk%6h?NUXAi_x!+Z|OqC59 z5*l{^q{(QjUXJethF|g`tbIWh5Viglw|0Oe6brGHN8R4-1q)q7#(VG+dKpom(M2IV z9P_K7aBHpuI8BBPbvL&cFtlYA!^0{_)rt_XgeWnekOVQewHZl1Q38}blAIjnWty%D z2OZVhis*z=tw_l~LRjsA1aVe$yC)_m`NwY`PH!Jv6vg1Y15g!(I@H_MMcrPsrPBk9 zr_bRgxkBumhp}3bhF1eB-$1YaE7DGLhny#8N*Y*Fi%RT)D*%3Q%{`FMNgho5GX(BQ zHp5A3I?2iX`SWl*z61ZoEWn;mS^M@AQ}CV z!~h4uoEVMei!Kw_9K%w5Zu%pbRSn%iDFpivY6VYUPEwF* zIH}N;W4@SAM{YzyhuobSF-?2jGg_n%DW1hs9XF!KX&tFAyWe8bkoN_-ncerjS1>i@ zYXI9}rE4(VOLX!mE1B!@Fs5O1cC#uGo|C^@PdQSuyE@qmuqzwO`IE7geqGlG@{D zVDt_$PKZqpJ*q@1G^rIRNgKN>hDz!Q;I+3>(g$r#l;+ML0n6ldanv$sgi|^_f$^!i zV3bO>-xEvW-7m7CQQa0j`z0pFDu$o)$&VX$MzBg;O*8zY2zF*fvh@R7;mRRBm*8hd zfW7QX$Uw`)j!(14@tXRH?fg_lPaC`fQc*3-)fa^0`YYko(A@}^kyow~bjvC_e+2YcUX<`7eEt?*2{A^b18STH~cVy=Wr(D z-F6(F~ZP$8@^C#9!8?pe;WE-!a6-@*u64`<2n#XLHyX@xAyX)hPZ;s?V?+VFd ztWOQFPAH}qdSqKlQ2ur2yfDOk@nvJ87-rC#+^O&VqPKI>&#F}=I#b+sWJqp*b)))y ze^vA5sBWiTA$$Y66MOf{mF^XGWj=v?56i2oo~Pk1>hk;2RMeU9=`IxQeS__vxBl_s z=|BGU^7+f}p1(Pu=h44=^2+^GFWA&DhrChKeVc)lp)4kV647>;CDLFm%O1?7ReaI@oNfzairwL6DNU`pyfoXY;g zHUi~hh9D^xf-vuyIh&`(!}Kh~rn|1i_N`PhmA!}F-P)V#&h9H$p&X*+h~x#bH5j^h zAsefetg*V7x?A#?%=M_y`qq1ZsoldBL$-=6sb6 zK<^X$Lt!{{EITR@$FwFk`|Vb z>yD4iiOdIn6~7^TdcYw+;YhKT2bRJnE<6Z zbYicAj0$1tU|cmfSNWZ-={ZY0nH--9O41o#~=m>#5 zqzDA|X9xj>L*UrPLB#OAxho&SJtzPx5j{+36*Pw;7njVuAhC)kCFn_(v+0b2p_vPf z8;^XsZDm6wxGFg4O+}@$3mQ~OhzXJqwo)r=7Ai) zDX0@dSXc$FunBdQUV+@L98J)cP%8lHO(%m_b-URYgn-m)Pw*QvZD8HFB3+k~a#LVF zUy#LpjkXZ3U_})bu$pFRKMIB2h$|4261EHrLzn}v%7J;6i`rXvsJa_b^^AITN)53> zt0LS{*B)s+_dJ^LqDQ2+Cr5g(Lk zSK;{DK73w`R!0QI+Uruk?-wKLI1e6@S0?6R70dmR9+`+Z>UC#dqIo>Tos6v~dwtwx zyVhE}dkf=6o|tIhFonNWT=qwNnIhu0!;kkcg&HZPUB@Df(~<`q#&i3}7tz<`5+LAWu2jFl=j1;~tx;qKp=5T#z|s=*a07W{m^d8Zvwy z;PAk-=bdFVP>&S1&O@Un+C7%P@l`U_a~cKBrsO#LpcqUW4VP)C!YzpR0Zb?)INAQW z#v1+u?S|6?fd%T`qgV;*3Lllfu%OS+-9fdA6u=WXs7k5;+e!x=N0V%(#08)hoE+8lnRC^doEY@c7#W@FiLlr+cAvBDOt8m)!|_&j#Lxxa74d5hSsX&Ii5H00eg zPo%Qlj za_x);#Y+crixjH>an3nj-ZqyL48$kD7K8XH7OH_@h#X6JI4pcx?CZbo?ccq3|G~qr z9)0_#FoG>q%a-Wx!=LDRG2=E<7S9JhV;POQ0}XLRJjk;@|6ijUJuj0yf#a*TJ)qdDT?ykGSa=#g@*|!1?(&V zFs;)aFecs`?z?4;nBO}g|xq!*hx$Y)ldL$EqM zH;<8Q0y!Rfw74Q)_;OC)9n*L=IUN0Mo^W245PK%u+htBsn!XRpGzVuLMCf8v#1Hcj zb}Hmj*Vm}N7h6}{?~bos=pM};V~1jm&_opq0<=kN<}!0}EIO5uia)OZS_Y2f%V)>+ z&d(dw15cIee<;Vb<3{+0J#u7QCzc7y!<8U06$_jUZ!e~|=bYTdo?dBrXx)d`u)DR{ z$fBQJ)&E|u>Kc;>v(^&Qj=9MlqEt!9PKP2`skv67lAM!}x3QiQ>b}Z6L=$V=GD2D1 zDOQ&HUeknqh+D@A2U|QQBda+s4zd3v)C>?oPg#GESl-ghUFTdMhjrU?{FoV z5G}B|-yu-MQvS?JkU(E|ZPm$KVCu|OD(hQE2u?UHluY0J2fp@OM-i;vldS9GIX} z{=gmQ{F{dc(BS0eUJ2BLG>UgRdbbZd)!kC0#CM|w#iDz{24x{=2L-ZG6ID;lM|N8i zdr-)rdLYzP)OT~UP4$$^6Cl#tQTa}#i^l~wJJs!bU*Vd(zc2l6P)R0&iMlyLar^W8 zcY|FS=>rRXE+J}mx=pJdyV20CpibHhQ8`}g9)T}w@~SHI0tniK)FHx9CJbMnSTUiY zSq0GO;e7;}FuXg?ha*0vUOkk zk&>NbZ^Nf@>bKp|ksY_+rbuu%z$Q+q(z7`~hn5}7i1v6cKg|i9GujTPXpWvSJI>&K zn!~6?XWeNeV>I}{Y@GwoA!3F5?ms^?Pb2K#I5tm%(Li@^51)Sy&bufm<=f9c>xXQO z@iIT*3q7%oNF(`UM(62qK+MFJV`8$bpduj@gtojw0U}$F^7RaF#Le=tO1lHm`c&+( z-+W6xZgc?lj^&_yBjV|-dW=q1!cuq5M5-q|&yRsQ~9Pk)V<#UK$fmFY^ScMA{L}}Ty z`ZFBkxt7~P^0r{L@bFrvimQ+@VKr3}vf53@=r!~0=ODc$+?N|4b~e%n!jK(yHr&Cl zHW`J+H=^{&8xaKQ*@BQu4slGB#wOAQstWgH?Gw!>qlC;v%pX=oO-vq(^Orn1G_uk> zwAt->Lyd;1@m%eU+WL!4fA*Ed;tQ%+kUC?<02bbny}=$kF5{_!vEU7(?+4No+Y~q}I0MJ{d z_;&Us_#-djX@?~f1Ho&)W@PwGbk{@%)4^HI;3+Mhd?3{2h$a6yqV>b$dK|i*^M9$4EbmcW&>tjz?_} zb$1**r0+p+;(^cx$UbiTR6K8hSh0+KP6F~D982X?<(Lzg?}CUZkyIZqQYxN8Ei-mdS4^x{&rUe31zQ~^FYE|&!nfW1TL7G$5 zF_}>(@-muvY7#zo>dUC4+tW+9NUWNAMy6FtnV6smO${~h3hlsYq;*pI?MWgHxO>wc zA^Eg>rVr94h@OyQaG8jLGl?rVJ~#=;eWy@gt>}Pz{0Q6Ea`!q2R@#u4{}JJJh+#_OQNO&O3c>?6hjVYL_J|u&@=XU z_nz$kqY1q>xV#uo^C7BJ>-D=OJr{2fBz?JslUQP=xnZDqkyRIwdK$V9&g6WQLRzY- z4r`nf8R=M!$l+@kBFpRnEIZ_|5=zJ{a;)TQNqGs)9)_&k+Hn|9rNlAPfBEqL0r!R;MgRZ+ literal 24030 zcmZvE^_!j5+3rln_qgkxnT)%;X58J~eUH2BJwT8mg*HfO(Y8=1v`8s(D)hRLkOT-x zkfbD#^Yzg7JBP{-=N~xty`PnL59ztC`_c8vT93UG-TC*Q{sc|*mXPp=y zoD!K@_db`4j9?+4WN~+YbI5K=9g{IWWMmJ^`NL>Rc|i#tTK;(Hx@iwhU2=Vj<7HHUd5dm;&RL09#5uC>>+~WrM0ffVZc}wqsVJbWgVpHj7$Us1g7(M_k}e!JAdQ z)~f_8IaWOLR&sC>Zi}Xsrh)3 zU^J9*2Ar88L4X~jvkUs@N179gkDXXNZwB851Ta={?P5gR@dSdMtdb_yf?iDKDFQUL zVJ(h`ozLSv4cS$e>3!292Wu$uy76a_XAP9Rl^Y&~^7v@Q^fmj{j=Ndc!Kf_WZj zNmSLtGH~Vo87Gx0Xr?MKAPJ;mE)L5jBi!^Ph|zR1GRBq-B>wxJ`{1ZOJOmfKdsjVY7>U+-UC2?4151&IZ|2>R$=usGIG z42U;qh!$-W!rpcbJP*_onctKSxd{R)PXD30Ow`;?NTv@67Xi)_kA;G%DH2=HyLHj) zo?R*!8=mo(9)k~1y$o$Tmi@xm*$s86*5T%QL%;+95C%s+4bTl-xdlS)pAGWO%g+t) zfX)|Q0<_Kux2@ZKG6J}eF<&cN?@pAZhE}HuJJteVqfW`ojc4y%x4FjS+g<(@;{>pcERTm# z1>!_0nELXOR(?$VcC8a!AV<^!1mIqroE6CHfb-7`{_TZ_{`#jER>a;BappGN1T^QY zWj(}Fgm|k9S=l{;KKK7p!9*P#lb_xOips!seE1*2Sj5gcL!Yj6&NQ7@XgPE zk{_Z@!yyKI@)nrdg?Q@x+2wrml(}u|5GM9K6_$Yi@Oo5Y{GHJK$LamZ*Ae0kOT}aW4`HzP}g`uD%YX zZ236DT#GtKOA)hs>3R0j76@<+Ut*~Nxgx+-PN6OFHGu!5DsCmj3(f~~Ry`@6Z$nT1A@tMSA2zvWrxb_MsXKvc^lVe7_+L;?n=%^OCKzb5xq;3h;#Kd2lw;htIHd zS~zsRcyU6{WX`LP0aRX*%A1W|U>cSO<96p@=|ScylNDabf>hyb6EBO_ai32D7*!rB zP)u+g*O{`fUKO7q2$I*So@*Aj>&h6E2F46NmToQ(cfwW?>^xyS7b4* z2?6%25DW!#0ZeCsErJSoPQXq?AnKza~h)2?sLQwdEj@rH-t*;D(ER1-+9)u&o}bgF`hb}0yqSb;wnv~`$AE?0pw z0f22^t4bw%f?H~mg+md6>mr%?3nw?k=w>M%MG?cNZyRAF3HF#BZq>irkt&N@ptcRe z6eFHWZLRKj%0`l{3M;%-pcGI9h~;IYUJ$B>0nBj3^?@Q(WkS91{4SeMLt?4dnIF5r z3}HbtOJBVti-xT=Zfz{X3S7mkEQtWi%|i z;?ChoNWrcbWEiXC^7E{vbPjIT$6tT`8*srl&%F$#lRpU5dw_j%-wEz7`ttn;%uzct z0t|z4K|9-EsvoYOno>c5&jb=!s)yaOeD(otWlDvaiOd+AnX=U4Mor4QKb7lzDtbkE z|0T$pnb9GhHT{F1f%E<-F4uy9-4L+tHn1(@Jb0}&1Jqe<1UK?X7w!hLX5S2f(m}jn zbGd5@0%&2h0zo?qU>mH#?62r>!-HMV0$$&Wew%b%DPv1mJcU_ zAcOA$xKZ|(;M-?kfTE`BnP*eQtIn!jr6~bvy_GPw+6LPpx;+2&49f>#0{`okx8|6U zeKO~?=z54e5G#+-(val|HP{a980g&}gH^3m=y<(7qoLw>^)cwc)i*^lae|NTXO#`l z<%-#s3EA2K)|3oZ;CRe1G*xM-h)Pckko;)`mAG>p2GbVG7K z)%#iCjX0RhKc!D=W}>6 z*BG#wK1aW-P-|$(4*TGOuYb+{j^INDoK8SACuFt0POPW^NA5fuG%=sIEzX&GPj`kZ zKumC39x>(8^WdBot{_Hdt`SU72$4FH>Z3XMEO$_aczhT5USI;mz<4Y((nrDBwZz-% zR`k_X+Ddu_E4X)!6RMEcRDzl@l3((5qR|<#|0e;ZOI?SI85l40;h+%l|UW2;q%O_!Ofdrc>hJ7}3mXl+t$iUX* z2avB!;+n4t+7m6Ss$q&V>B4Rdx4RloXmL01(j01HjVRNuu|c_%Oc^F zD%fBlXeiM%QCI>1udEB;4+cCVP@Z9#`!Gkv%YAj`^MMJxBfeYQ`ZGU_9C_#E@->(o z;2M%kbD>v&_AKqIm*tY?ViQYGgZIGpDo_8PIP*L4U3^+3kISf6W`?l5*#5jR&&^BE zngI0PAKfb2<$HFa@EiA?mnFiXQXfv;4g_Q~Y~>5i;4Wlas`?phV34iJECqsMLO5H1 z^N)db4zsKQK4D>u*>kH08|GUaIZ^~}tK5$(Xn#OFT{$Ab8QEA)Oo7^ni(xPYKr1_a78DuCq6L_R<`}R>u~pfK5#Ye%*Ltbc zmB2`zU#p7=gEGA=*BloCo+nymenJtOa!Om^I~Y^I<=wj+nHHcuw5ylrb*-NS?`GS1 z7FeQemwwF4T>J2Mf&{E9V7ZPhklQa-eKuds@e#>5Mz({MfdH>UR?k0wz;e-`@(=sN zr+73K9Bp0gwGfU0Yw<>Q?{2U)!xQbb%b?H&IDnQwDi>?EIWU^m8`#)izY@uQWcmb5 zK@Kaf7sOMi^zKeD`b%*;dwk~@s4V~L-4H5CoFRbKM?VaQ$hHy_{Nsmx*)5g>G3Y7W zj@#kh=YN3w&Z^kpsl#CAUxLnv@9b>}rpSHs5&PiLi+3Z2y~aHOB|{>IYamtY`8IM& zB__)X_@Ig%)P74?nN?LMEY5BaUHL(cS+VELXKKz|g+s$Wvj%XRKyc~s|9<@m(NjeH zCucZ44Wp|2V65(dvGzEJ;wMzScCd0a)yTcADv%n@=2Wg0jfXaKgDd6&5$7tE7bQM7`Bs^Ph_>N0@2$Wr2+2(S0Fl#gz z1jN1nTT!wg45BhT*|uPZpmyE|1m|yfjY2N|CKum)mfdK^=um1XQwxtGMnZGatp1Z@m zpZTe_)DqH?Wh@vN*>+44AK!AkKkdXoIutbqWMxAHctX4Cnm`!5ufD}sTMR3P%9|s_ z;o8ZQi- zz4kanDvzow8yF~V`Q%SfZvuDB;4-#X@4acU5O&;t=nh0PXl{FWuLJVqmvT#(dJP3k zT>EGPxcO()FJI7>Sk%D9U!8fboP|C9`AP6C&`?f3%hY+gy}%OFo-xnqpj^252?KaU zH9MfyEamWofI+taeqhP(jlcE~CF{c3(*XBBxT3z?x(iRW_=!J~8)6Rmvi4FiZ#Kqo z2^dgjy$fC|28&rx1i?N77-k>`q@E5fEWOX0L(K=IZwen}*`0p~3}D&>TiNXHAke!{ zaeqJ&pTS(*1Rkkli@5+eAO>2fFopno_a+!%Z>XrTdH5C^P$WoT@6cb>#%WLPIc zUiqQ6#`9S!K8WQc;N}^*v_Y{w8HM$sg53njq<8-0ecbD>FFzE_k4JJ}@=jk(HsgQp zJ~c&n7xU%C9WRjaVI5V)opge(-?{EPxCcd0uW9TrfzN?RHy1a}2gOM<0#`*12rTBY z7~|>4F@xWC%C*n^*vuJbq*^Wp572|9B**cFl9oIc#Rm7q`*Qix(u%rZei)WPfQm{L zrynpe?~;?3-3Kjzf!6T#T~NImTq_~M#GAYX$&ff&Qr*?0Ml)YIC)bVeO^ild4;V){ z5Hkd}P|Bu?2Q{2~6TCZ>RcizR?9-!gt2F;L1Gwrf0fiMl%kNNAs9d`|Y8%Z0b1D|w zl(U#KUj&`S+n0AdR81jR`;4o{z;1QtB(4AR%o7RS)6i;p1cqgiehnu)+eHu2Tzqjh zw-4lNUJe$Z+AG#lrrIKuC8h@8Pa#Y)o0PA-a1zXXmQvO|u*S4D4*Q5D{5S+($re*7 zl!ex^-U?_eN5Ho#ZadSrZvVqa><_nFTX)3^?g3)@&;MLpY!J6L?!iF~2&m@YWo7!J zK_)9O=9%#-WI+i&{Ym3WtY0RKtVnm3mx_;fUUHIlkt!?A7G;u+<|z7x-Nh#-%6(nb zh-3foK}^70OTSzrTy@0U>0ghEV?{(11P?eUrYcV!39x*~a%Rncr18~*d2kmqcB~0Y znQ;gR`b2C%gcj>UA=dpDy!F$W4UF!Y8^4ZG(+)1alDl9q|8@I|&P}FaXpTi^&`&k7nnLaGDv$~7Cx2Fro> z#V1+~L3os#zyT)iDB9h&Vdn7Yz$|Ea_MdmYB_?=pjFYCbcMHAk#O|Hps^|m7YE+lN zR%Jc`wIZK|dSEHC>1iWhA*c}%snQ2)tw&oN*zWCUjI|^w#{JCivB+Qo-3=m}x_q1X zP8*;4MDA`3vyD<2$X2Kw1*#UTD@ ztig(`%0UZ?Zg(&tZM z(VE>PV5#wGEi`qG>E4-3NAB%g7qQDDb>Y^ zSKeA;E>r>VZeKsJ?v`&Kx@&zO+D&kp@b8CfzM82YV6D1Hd{+&0o=6cUtdLEF~||rrBb&H{U};l2Fs;-@P9pgirHp{)c)h30tF1| z-=BV~^TJc&SQ>(4rw)icYe~UWvAA3oK6_%CqYO~N*@2qYay&PHH4ErLMWSk)UuFSk zb?SP4>&ofxiG!zc5Y=ftbfAR$ya@rYOQ*USK0(aoTQ~vM?)4(`mM>jLngn*&JDsQ1b4_1iR7_(Jr%Tx}fvot@x z6D**_H=l3eMgZp5DILtW#D)6>G7G^L7lRhW6duLknOk#|)1x)1So{l|3OsnDrKpg*Li?A+E~ki)bbA)x*BV+Rv$1b z0?t96%2o4-GI9ME^BJl_;Q7w%xO)GI{&GvB*KuE^oM34TrGVvq@mA5ZMT~8UbYeiq zyZDhZk2c5|!=+zCEO2-=CC#?$8fusbcHgH@GcX_B&8F3X1UxU#SMCgEDH#~N<}f1D zQj5W*@VJAHgXnh4Tb^S@j1PeUYUV(j62~}m86o;EggN?5Gq93&?LpBlJS0-%UEH$W zw2JK_12Q$Nt%{=F6Y7RGq6x+{<8rnsy?{6F}YzAqDo~_ZBiCu$4#nk)5QU9V$@hd01r7Gk~DV= z(zCa0Pz8Gd=BOJO!0#dJ{3v+B8qP;gHPoOcbgd>1Ze*oraX|320OKFA#k<)P084$g zpM#7wboDM31EZ>AW(g?$%Y%O$+lQi#2aUH_!ju!t=k1v4zy;nSn%H-Y06&=AATTlu zmZpmYSDiO={$;h4TLQ(OI|dpVQJd5pMpH!%S{ln1s1E=OVeW1M#}80()ZLjH$z5nr zlPZFB3Y33m(T+!L7!4_Mfn@D=l&{$Bb5k`QU_i@O9yregaI7!^-b>u*TzW1zPz0jt zzs&9dO3wWZJhqGp^mgTNDA6&`fVu^mQ5^FS6ZN9oHUvX4|EVpv%iDqR0M(z+izDWF zpO0!}xqyezknP!F=Q|mn?8cCWau6NG6!Y+pJ6_RzDul3Eri<-h(WZhGZ9PJ#^3kbw zgOvz#9Wxlf+7wtd3z9b{_SY)FiP!)4G^+z#cRN;zU}S z{LX`d`A&dC0N4>BJouw0p_HgPaVRYAhB?-`6_D9d&lXz)oqg4Zvw@?;{@65+1Dt-| z0ld%#Or6tC7Sb5vGDp@6Q1pLqedAS86QUpoL8>bqb%E!ekflVrtU;`=X?JnbS1l^| z5-47UVzXq3r4tUS>Pt5+%&6WmB{R;eAfQYHcpS?R_~0QhW)R@xNJ)j!r++kBF3t?6 zRjYr$_?#HR`ST^uX#QPYNHrvbROx!cHJ{;G+jQk^Xlmoo@Vn8oY&pQ{AiS)zpRcv8 z;JDO{W_VP|5_kZpj|HciPFsMYYV)Wo!IaB$v6@30i)AH{HP87L>jxIYHe*30aoa{v z3dp0f#SuaeVj4BfL2GL1VetUNx%MiT@h4oTGyCDP6jC#+L#D6awgDU{vuv=3tD_(u z<*SomM`6qTXy9XwnP9x9la-fYAHZY_s_NHUpndsU&BHtcI?Vy4?x-Ppvpb7b!&0;D zXck*U&>hUD3a*@V;W-1d`xpBlXIaSu7w_E9k2MVE{N;C?D|}h?!i2{#B(TYWX$|7! zivfA4BTaep6(N1xV~fgvr5;AZ7FdQKQvz6LuWvBc0LOqJLep3eHDbBP)IvGNLKbj} zS*fbcsITmW$-rrtV%WRm&OAH;X*B<<4=5{YFLno`O!!=ZS6S#h6uyNC`1+-+I8L7- z#-IH$(Y~&7aN%B<{wyfLl{X;AhvQj5skJ$pzem%!pGz+>z7Fs3W~;8_)QeKVf$rf7 zXVH?q)F`ic=K+reeKfpmfSLU1RvSxtW9SE3SJx*F^EkDRt?M}-uRkOU7k?YWe6a3S zDV~^A`yFOb=Ms3tHV{xtJ+BGu^Hc9Vk~i#JuFg3X;|=Ga6W9s%aXTmynq$>+Bp3q|UfK4d9Hpvm02tbF-az&pc$= zd$Z@DdMhhIz@O_iEKHmby%55u`^LX)tFu(7EPLwgk^`gEFCFqZ>x*Ooyf?|Y*!+9J z;#sTHR(K7+v#Z@;21cm2J2aDfHtv8esuN~1^z1Yhh^@0P!_dGk2F!nMq&YdduD(TH zv=e#mB;NxkJqSMxD5;o7LJ}1!nSe34zPaXri zdh+7y5JNMmro}T46b7)e1TkJEYyHhWJR?vBI^M95la>g@rCOXCS5Y(n#y3w~=aAQ% z%b8#w2Nnt{Xqq#%w(Itxe()C9E<0ZkGpnhZGSCF|i~BTNl(IZd5w>?eAr^7Itlc6P%yXBp$Z}#%{ovR2xut&@Ta1EXC5_; z7Q(yb#?%9hs$tHK+hJe;Hy1FqI>S+P?h!B#K1A=wFeib0sdOFGTwr=wISC-Y<-83h zw=Zm$%j(Bdb094G=3%CP&md?kokLy+-ty~5Y3)u|4s$bkCR) z^>YVIQwG?fE!Z}Q-H}M6_2Y-Zdw2xfWp)X_6hL7q*a^n+@=u32&K&6gj3Xi!PpC5J zIrrng-S@|gKDZeGfQ1!y9LykgTRr6Hk{I414or}$9ulGILFFmgvIw4N6m^zUr4q!w zwc1T^D17-ASpGjAzio_`KsTD#W)o1EKT*b`0j(m`t}P|Y#NGI}qHOb7(6P!WD+m^9 z0EqdWKJl*yZc!yLtR4b)NFEsA0%Fl7bBRZ%4)S7wTs_rk6{faf&vKgsb&VUrff`<7 zAIQQKFfdt~H8|%1ou$AkWI3_SlD;!Ethv)Meu87iI4vVSeK4UG(gAc7YqpG@fIVK# zZ37?PyQz0n7cYtne64#-9n^H@R@jUYs<>+oC^nx?ULeplS|{`cwxu zh)P}&`OPCwhfT8;1p^MbiMk%>y?V{J#%11NYAM)f1=X|JR?YuS%s{V!RsG3J{0_08 zitAVoKz`9ezG&dtTg9TMxer6R@po#)*MI#!QG~P57?Z|+FdJ?o?dqeZ8NTz|ho9(V zw?%rYiobg6C-(;i!IKHf-J1`DV3t+h*m|yR?>q*f=1DwXA5Z^L)WFE+3SjTIwa=hH4>>lz2F{bRodxO=p5d?0-ooRTfI|5>(9i*`n$K(( zm*q^15lNew7TBcj{O)?0aB_6AUo_zhr7twWhiE{~+%F zUP8#m;%4{{r|AVyhGJYW6KQ-8=4V@iY*1b-M{x3GZ|*&hIp z!=RLl3I65FV5Om&Eefm6{1?TI4&oRoI!rz^%}%cc)M6V8d#P9=IpXP4<$u_rQ{J_*!<4&JIkkD_VufEc3qp=!buTHs&=9E*N4Mul^X!8N_aE4&+Tht%#er zhZQTs``s5KAkN(>tL*u?OvYpR#N|80r}1=X7oP!}H}JT{VcLpnQP^JRe#X+d#z{Q! zow)`_bORV8!(#y~ww772p;VK2z~e+)D)G{@XasCuz|FmYFFpI%w%Fj@D{oe%Mr|An zI2?|55KZF@u^L;@d_by*+!N%Q&4yA@_82>Rb%7;`14)4wU&$_(YdljRE#G%l{}JBy z+)EY6i3i-dD7uLo6=~sE#WM>mNPkIz;FlsJU9R8c;ANDRjmx>jGO3NY(aVy16ySP0$BCn{s zKAw}IOuP#TBRpu`YSYe=BNUdS*TL$w`)$|+>^p$R_WbmRJ7Nj{?9oXmJj6|4qMRy+ z`JfU|h%EbU*jI_B@wVfl=0l9DEkkWf17q{<^0lnA>N1r(PR*nE$Ky}KjIjk{5kD2y9&4B-+jsW$QY*-QwuT0d3k^&- zVBi#TQN1RvA&3J}sjbphhhkK7zj$3$vUbfTE0>`NXFxxG&ir?mp$%`86*qEC;0M90 z1pHP3-1fl~GXOM$oEFpybVdkhtKJ7c|BK$mM##zlj#V4b+zc3ie@Ft(b`|d26-243AMQnzs$>jp8P>mS5Y3sPj@-5>&JV4yAz%sM@#KDT-Uyc4w z)ZMh}9T=)1(43*jvWs_rpb9t9l#+!-HJEpyu7CKbL;7JWG$3jZ%yJBI@=Kx0j-gJE z68BMV|LHw2=RjlrVDJBgWq%YoFmC*J3{dCha$8IJ%&WgFNV;}PyVCONI5jt`rxWsK z^z*o)E6DsGKQtyp!r(pyj7NJZ^YNc(o3HQjWre5_6AjMb{0;+u zK3Tx|6=^fFq-IW;ezm9f=CjDf!e`i}zyd2-y(#r@==vXEszEImfai<0z64naV)Tz< zdlgnDz3MdVmTzA>sa>Py6>Li>t7)3DcbMv5tX)}N!T_mmt6QFpAG2TX7zEK04#wvv za;#2*HbFI6Bj-=9KmnM_HHe-%oX!r94YB$-rfHEz(m_noxb8Xk3>QYv;p1n)1KD>+p+cg$!nzC|!8~qkNahZNGsyhc ywd4w(a=_Wj3qpOQQ# Date: Sun, 21 Aug 2016 19:53:01 +0100 Subject: [PATCH 125/324] remove private from docs --- docs/docs.json | 2 +- docs/generator/doc-scanner.js | 1 - docs/generator/documentation.js | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 361d73ae6..bf94e24b8 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":10,"date":1471799153933},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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.","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#rest","name":"rest","description":"The REST manager of the client","memberof":"Client","type":{"types":[[["RESTManager",""]]]},"access":"private","meta":{"line":32,"file":"Client.js","path":"src/client"}},{"id":"Client#dataManager","name":"dataManager","description":"The data manager of the Client","memberof":"Client","type":{"types":[[["ClientDataManager",""]]]},"access":"private","meta":{"line":38,"file":"Client.js","path":"src/client"}},{"id":"Client#manager","name":"manager","description":"The manager of the Client","memberof":"Client","type":{"types":[[["ClientManager",""]]]},"access":"private","meta":{"line":44,"file":"Client.js","path":"src/client"}},{"id":"Client#ws","name":"ws","description":"The WebSocket Manager of the Client","memberof":"Client","type":{"types":[[["WebSocketManager",""]]]},"access":"private","meta":{"line":50,"file":"Client.js","path":"src/client"}},{"id":"Client#resolver","name":"resolver","description":"The Data Resolver of the Client","memberof":"Client","type":{"types":[[["ClientDataResolver",""]]]},"access":"private","meta":{"line":56,"file":"Client.js","path":"src/client"}},{"id":"Client#actions","name":"actions","description":"The Action Manager of the Client","memberof":"Client","type":{"types":[[["ActionsManager",""]]]},"access":"private","meta":{"line":62,"file":"Client.js","path":"src/client"}},{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"file":"ChannelUpdate.js","path":"src/client/actions"}},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":49,"file":"GuildDelete.js","path":"src/client/actions"}},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"file":"GuildMemberRemove.js","path":"src/client/actions"}},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":32,"file":"GuildRoleCreate.js","path":"src/client/actions"}},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":47,"file":"GuildRoleDelete.js","path":"src/client/actions"}},{"id":"Client#event:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"file":"GuildRoleUpdate.js","path":"src/client/actions"}},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":38,"file":"GuildUpdate.js","path":"src/client/actions"}},{"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"}},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"}},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"file":"ClientDataManager.js","path":"src/client"}},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":20,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":23,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":19,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":25,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":19,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":74,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":52,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":60,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"}},{"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":34,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":200,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"}}]},{"id":"ClientDataResolver","name":"ClientDataResolver","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","meta":{"line":18,"file":"ClientDataResolver.js","path":"src/client"},"access":"private","methods":[{"id":"ClientDataResolver#resolveUser","name":"resolveUser","description":"Resolves a UserResolvable to a User object","memberof":"ClientDataResolver","meta":{"line":37,"file":"ClientDataResolver.js","path":"src/client"},"returns":{"types":[[["User",""]]]},"params":[{"name":"user","description":"the UserResolvable to identify","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientDataResolver#resolveGuild","name":"resolveGuild","description":"Resolves a GuildResolvable to a Guild object","memberof":"ClientDataResolver","meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"returns":{"types":[[["Guild",""]]]},"params":[{"name":"guild","description":"the GuildResolvable to identify","type":{"types":[[["GuildResolvable",""]]]}}]},{"id":"ClientDataResolver#resolveGuildMember","name":"resolveGuildMember","description":"Resolves a GuildMemberResolvable to a GuildMember object","memberof":"ClientDataResolver","meta":{"line":81,"file":"ClientDataResolver.js","path":"src/client"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"guild","description":"the guild that the member is part of","type":{"types":[[["GuildResolvable",""]]]}},{"name":"user","description":"the user that is part of the guild","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientDataResolver#resolveBase64","name":"resolveBase64","description":"Resolves a Base64Resolvable to a Base 64 image","memberof":"ClientDataResolver","meta":{"line":110,"file":"ClientDataResolver.js","path":"src/client"},"returns":{"types":[[["String",""]]]},"params":[{"name":"dataResolvable","description":"the base 64 resolvable you want to resolve","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientDataResolver#resolveChannel","name":"resolveChannel","description":"Resolves a ChannelResolvable to a Channel object","memberof":"ClientDataResolver","meta":{"line":130,"file":"ClientDataResolver.js","path":"src/client"},"returns":{"types":[[["Channel",""]]]},"params":[{"name":"channelResolvable","description":"the channel resolvable to resolve","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientDataResolver#resolveString","name":"resolveString","description":"Resolves a StringResolvable to a String","memberof":"ClientDataResolver","meta":{"line":155,"file":"ClientDataResolver.js","path":"src/client"},"returns":{"types":[[["String",""]]]},"params":[{"name":"stringResolvable","description":"the string resolvable to resolve","type":{"types":[[["StringResolvable",""]]]}}]}],"properties":[],"events":[]},{"id":"ClientManager","name":"ClientManager","description":"Manages the State and Background Tasks of the Client","meta":{"line":7,"file":"ClientManager.js","path":"src/client"},"access":"private","methods":[{"id":"ClientManager#connectToWebSocket","name":"connectToWebSocket","description":"Connects the Client to the WebSocket","memberof":"ClientManager","meta":{"line":29,"file":"ClientManager.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"token","description":"the authorization token","type":{"types":[[["String",""]]]}},{"name":"resolve","description":"function to run when connection is successful","type":{"types":[[["function",""]]]}},{"name":"reject","description":"function to run when connection fails","type":{"types":[[["function",""]]]}}]},{"id":"ClientManager#setupKeepAlive","name":"setupKeepAlive","description":"Sets up a keep-alive interval to keep the Client's connection valid","memberof":"ClientManager","meta":{"line":46,"file":"ClientManager.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"time","description":"the interval in milliseconds at which heartbeat packets should be sent","type":{"types":[[["Number",""]]]}}]}],"properties":[{"id":"ClientManager#client","name":"client","description":"The Client that instantiated this Manager","memberof":"ClientManager","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"ClientManager.js","path":"src/client"}},{"id":"ClientManager#heartbeatInterval","name":"heartbeatInterval","description":"The heartbeat interval, null if not yet set","memberof":"ClientManager","type":{"types":[[["Number",""]]]},"meta":{"line":19,"file":"ClientManager.js","path":"src/client"}}],"events":[]},{"id":"RequestHandler","name":"RequestHandler","description":"A base class for different types of rate limiting handlers for the REST API.","meta":{"line":5,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"access":"private","methods":[{"id":"RequestHandler#push","name":"push","description":"Push a new API request into this bucket","memberof":"RequestHandler","meta":{"line":36,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"returns":{"types":[[["null",""]]]},"params":[{"name":"request","description":"the new request to push into the queue","type":{"types":[[["APIRequest",""]]]}}]},{"id":"RequestHandler#handle","name":"handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"RequestHandler","meta":{"line":43,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"RequestHandler#restManager","name":"restManager","description":"The RESTManager that instantiated this RequestHandler","memberof":"RequestHandler","type":{"types":[[["RESTManager",""]]]},"meta":{"line":11,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}},{"id":"RequestHandler#queue","name":"queue","description":"A list of requests that have yet to be processed.","memberof":"RequestHandler","type":{"types":[[["Array",".<"],["APIRequest",">"]]]},"meta":{"line":17,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}},{"id":"RequestHandler#globalLimit","name":"globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"RequestHandler","type":{"types":[[["Boolean",""]]]},"meta":{"line":24,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}}],"events":[]},{"id":"SequentialRequestHandler","name":"SequentialRequestHandler","description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","meta":{"line":10,"file":"Sequential.js","path":"src/client/rest/RequestHandlers"},"extends":["RequestHandler"],"access":"private","methods":[{"id":"SequentialRequestHandler#execute","name":"execute","description":"Performs a request then resolves a promise to indicate its readiness for a new request","memberof":"SequentialRequestHandler","meta":{"line":39,"file":"Sequential.js","path":"src/client/rest/RequestHandlers"},"returns":{"types":[[["Promise",".<"],["Object",", "],["Error",">"]]]},"params":[{"name":"item","description":"the item to execute","type":{"types":[[["APIRequest",""]]]}}]},{"id":"SequentialRequestHandler#push","name":"push","description":"Push a new API request into this bucket","memberof":"SequentialRequestHandler","inherits":"RequestHandler#push","inherited":true,"meta":{"line":36,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"returns":{"types":[[["null",""]]]},"params":[{"name":"request","description":"the new request to push into the queue","type":{"types":[[["APIRequest",""]]]}}]},{"id":"SequentialRequestHandler#handle","name":"handle","description":"Attempts to get this RequestHandler to process its current queue","memberof":"SequentialRequestHandler","inherits":"RequestHandler#handle","inherited":true,"meta":{"line":43,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"SequentialRequestHandler#waiting","name":"waiting","description":"Whether this rate limiter is waiting for a response from a request","memberof":"SequentialRequestHandler","type":{"types":[[["Boolean",""]]]},"meta":{"line":19,"file":"Sequential.js","path":"src/client/rest/RequestHandlers"}},{"id":"SequentialRequestHandler#timeDifference","name":"timeDifference","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","memberof":"SequentialRequestHandler","type":{"types":[[["Number",""]]]},"meta":{"line":26,"file":"Sequential.js","path":"src/client/rest/RequestHandlers"}},{"id":"SequentialRequestHandler#restManager","name":"restManager","description":"The RESTManager that instantiated this RequestHandler","memberof":"SequentialRequestHandler","type":{"types":[[["RESTManager",""]]]},"meta":{"line":11,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}},{"id":"SequentialRequestHandler#queue","name":"queue","description":"A list of requests that have yet to be processed.","memberof":"SequentialRequestHandler","type":{"types":[[["Array",".<"],["APIRequest",">"]]]},"meta":{"line":17,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}},{"id":"SequentialRequestHandler#globalLimit","name":"globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","memberof":"SequentialRequestHandler","type":{"types":[[["Boolean",""]]]},"meta":{"line":24,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}}],"events":[]},{"id":"WebSocketManager","name":"WebSocketManager","description":"The WebSocket Manager of the Client","meta":{"line":10,"file":"WebSocketManager.js","path":"src/client/websocket"},"access":"private","methods":[{"id":"WebSocketManager#connect","name":"connect","description":"Connects the client to a given gateway","memberof":"WebSocketManager","meta":{"line":54,"file":"WebSocketManager.js","path":"src/client/websocket"},"returns":{"types":[[["null",""]]]},"params":[{"name":"gateway","description":"the gateway to connect to","type":{"types":[[["String",""]]]}}]},{"id":"WebSocketManager#send","name":"send","description":"Sends a packet to the gateway","memberof":"WebSocketManager","meta":{"line":72,"file":"WebSocketManager.js","path":"src/client/websocket"},"returns":{"types":[[["null",""]]]},"params":[{"name":"packet","description":"An object that can be JSON stringified","type":{"types":[[["Object",""]]]}}]},{"id":"WebSocketManager#eventOpen","name":"eventOpen","description":"Run whenever the gateway connections opens up","memberof":"WebSocketManager","meta":{"line":82,"file":"WebSocketManager.js","path":"src/client/websocket"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"WebSocketManager#_sendResume","name":"_sendResume","description":"Sends a gatway resume packet, in cases of unexpected disconnections.","memberof":"WebSocketManager","meta":{"line":94,"file":"WebSocketManager.js","path":"src/client/websocket"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"WebSocketManager#_sendNewIdentify","name":"_sendNewIdentify","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","memberof":"WebSocketManager","meta":{"line":111,"file":"WebSocketManager.js","path":"src/client/websocket"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"WebSocketManager#eventClose","name":"eventClose","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","memberof":"WebSocketManager","meta":{"line":126,"file":"WebSocketManager.js","path":"src/client/websocket"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"WebSocketManager#eventMessage","name":"eventMessage","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","memberof":"WebSocketManager","meta":{"line":138,"file":"WebSocketManager.js","path":"src/client/websocket"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"data","description":"the received websocket data","type":{"types":[[["Object",""]]]}}]},{"id":"WebSocketManager#eventError","name":"eventError","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","memberof":"WebSocketManager","meta":{"line":162,"file":"WebSocketManager.js","path":"src/client/websocket"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"WebSocketManager#checkIfReady","name":"checkIfReady","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","memberof":"WebSocketManager","meta":{"line":172,"file":"WebSocketManager.js","path":"src/client/websocket"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"WebSocketManager#tryReconnect","name":"tryReconnect","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","memberof":"WebSocketManager","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"WebSocketManager#client","name":"client","description":"The Client that instantiated this WebSocketManager","memberof":"WebSocketManager","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"WebSocketManager#packetManager","name":"packetManager","description":"A WebSocket Packet manager, it handles all the messages","memberof":"WebSocketManager","type":{"types":[[["PacketManager",""]]]},"meta":{"line":23,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"WebSocketManager#status","name":"status","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","memberof":"WebSocketManager","type":{"types":[[["Number",""]]]},"meta":{"line":28,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"WebSocketManager#sessionID","name":"sessionID","description":"The session ID of the connection, null if not yet available.","memberof":"WebSocketManager","type":{"types":[[["String",""]]]},"meta":{"line":34,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"WebSocketManager#sequence","name":"sequence","description":"The packet count of the client, null if not yet available.","memberof":"WebSocketManager","type":{"types":[[["Number",""]]]},"meta":{"line":40,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"WebSocketManager#gateway","name":"gateway","description":"The gateway address for this WebSocket connection, null if not yet available.","memberof":"WebSocketManager","type":{"types":[[["String",""]]]},"meta":{"line":46,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"WebSocketManager#ws","name":"ws","description":"The WebSocket connection to the gateway","memberof":"WebSocketManager","type":{"types":[[["WebSocket",""]]]},"meta":{"line":60,"file":"WebSocketManager.js","path":"src/client/websocket"}}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#setup","access":"private","name":"setup","description":"Sets up the Guild","memberof":"Guild","meta":{"line":188,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"data","type":{"types":[[["any",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":25,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"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":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}}]} \ No newline at end of file +{"meta":{"version":10,"date":1471805584857},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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.","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"file":"ChannelUpdate.js","path":"src/client/actions"}},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":49,"file":"GuildDelete.js","path":"src/client/actions"}},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"file":"GuildMemberRemove.js","path":"src/client/actions"}},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":32,"file":"GuildRoleCreate.js","path":"src/client/actions"}},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":47,"file":"GuildRoleDelete.js","path":"src/client/actions"}},{"id":"Client#event:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"file":"GuildRoleUpdate.js","path":"src/client/actions"}},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":38,"file":"GuildUpdate.js","path":"src/client/actions"}},{"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"}},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"}},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"file":"ClientDataManager.js","path":"src/client"}},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":20,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":23,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":19,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":25,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":19,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":74,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":52,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":60,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"}},{"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":34,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":200,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"}}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":25,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"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":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}}]} \ No newline at end of file diff --git a/docs/generator/doc-scanner.js b/docs/generator/doc-scanner.js index 241e0dd3d..54fdaf51f 100644 --- a/docs/generator/doc-scanner.js +++ b/docs/generator/doc-scanner.js @@ -10,7 +10,6 @@ module.exports = class DocumentationScanner { return new Promise((resolve, reject) => { const stream = parse({ src: [`${directory}*.js`, `${directory}**/*.js`], - private: true, }); let json = ''; diff --git a/docs/generator/documentation.js b/docs/generator/documentation.js index 1a506e217..9eb34b827 100644 --- a/docs/generator/documentation.js +++ b/docs/generator/documentation.js @@ -81,7 +81,8 @@ class Documentation { } const parent = this.findParent(member); if (!parent) { - throw new Error(`${member.name} has no accessible parent - ${JSON.stringify(member)}`); + console.log(new Error(`${member.name || member.directData.name} has no accessible parent`)); + continue; } parent.add(item); } From d66ac3fc3936c199472b1d07cb15f21d24947b21 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 10:53:48 +0100 Subject: [PATCH 126/324] Add param optional to docs --- docs/docs.json | 2 +- docs/generator/types/DocumentedParam.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index bf94e24b8..4fdc3e6ad 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":10,"date":1471805584857},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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.","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"file":"ChannelUpdate.js","path":"src/client/actions"}},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":49,"file":"GuildDelete.js","path":"src/client/actions"}},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"file":"GuildMemberRemove.js","path":"src/client/actions"}},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":32,"file":"GuildRoleCreate.js","path":"src/client/actions"}},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":47,"file":"GuildRoleDelete.js","path":"src/client/actions"}},{"id":"Client#event:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"file":"GuildRoleUpdate.js","path":"src/client/actions"}},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":38,"file":"GuildUpdate.js","path":"src/client/actions"}},{"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"}},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"}},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"file":"ClientDataManager.js","path":"src/client"}},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":20,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":23,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":19,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":25,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":19,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":74,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":52,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":60,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"}},{"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":34,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":200,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"}}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":25,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"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":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}}]} \ No newline at end of file +{"meta":{"version":10,"date":1471859632935},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"file":"ChannelUpdate.js","path":"src/client/actions"}},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":49,"file":"GuildDelete.js","path":"src/client/actions"}},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"file":"GuildMemberRemove.js","path":"src/client/actions"}},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":32,"file":"GuildRoleCreate.js","path":"src/client/actions"}},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":47,"file":"GuildRoleDelete.js","path":"src/client/actions"}},{"id":"Client#event:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"file":"GuildRoleUpdate.js","path":"src/client/actions"}},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":38,"file":"GuildUpdate.js","path":"src/client/actions"}},{"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"}},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"}},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"file":"ClientDataManager.js","path":"src/client"}},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":20,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":23,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":19,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":25,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":19,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":74,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":52,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":60,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"}},{"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":34,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":200,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"}}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":25,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"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":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}}]} \ No newline at end of file diff --git a/docs/generator/types/DocumentedParam.js b/docs/generator/types/DocumentedParam.js index d7d25b639..bb94d7e37 100644 --- a/docs/generator/types/DocumentedParam.js +++ b/docs/generator/types/DocumentedParam.js @@ -23,10 +23,11 @@ class DocumentedParam extends DocumentedItem { serialize() { super.serialize(); - const { name, description, type } = this.directData; + const { name, description, type, optional } = this.directData; return { name, description, + optional, type: type.serialize(), }; } From f255094760294e7fc8ffca89b8e5d25691a412b2 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 14:53:19 +0100 Subject: [PATCH 127/324] add params to events --- docs/generator/types/DocumentedEvent.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/generator/types/DocumentedEvent.js b/docs/generator/types/DocumentedEvent.js index 17e029a91..f92b36d2b 100644 --- a/docs/generator/types/DocumentedEvent.js +++ b/docs/generator/types/DocumentedEvent.js @@ -1,5 +1,6 @@ const DocumentedItem = require('./DocumentedItem'); const DocumentedItemMeta = require('./DocumentedItemMeta'); +const DocumentedParam = require('./DocumentedParam'); /* { @@ -53,17 +54,22 @@ class DocumentedEvent extends DocumentedItem { registerMetaInfo(data) { this.directData = data; this.directData.meta = new DocumentedItemMeta(this, data.meta); + const newParams = []; + for (const param of data.params) { + newParams.push(new DocumentedParam(this, param)); + } } serialize() { super.serialize(); - const { id, name, description, memberof, meta } = this.directData; + const { id, name, description, memberof, meta, params } = this.directData; return { id, name, description, memberof, meta: meta.serialize(), + params: params.map(p => p.serialize()), }; } From 196fdfc31b396f82e41b285c66bfc62714e1814e Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 14:54:59 +0100 Subject: [PATCH 128/324] fix event docs --- docs/docs.json | 2 +- docs/generator/types/DocumentedEvent.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 4fdc3e6ad..e1b894bc5 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":10,"date":1471859632935},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"file":"ChannelUpdate.js","path":"src/client/actions"}},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":49,"file":"GuildDelete.js","path":"src/client/actions"}},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"file":"GuildMemberRemove.js","path":"src/client/actions"}},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":32,"file":"GuildRoleCreate.js","path":"src/client/actions"}},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":47,"file":"GuildRoleDelete.js","path":"src/client/actions"}},{"id":"Client#event:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"file":"GuildRoleUpdate.js","path":"src/client/actions"}},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":38,"file":"GuildUpdate.js","path":"src/client/actions"}},{"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"}},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"}},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"file":"ClientDataManager.js","path":"src/client"}},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":20,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":23,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":19,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":25,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":19,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":74,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":52,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":60,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"}},{"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":34,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"}},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":200,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"}}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":25,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"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":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}}]} \ No newline at end of file +{"meta":{"version":10,"date":1471874103869},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":25,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"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":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}}]} \ No newline at end of file diff --git a/docs/generator/types/DocumentedEvent.js b/docs/generator/types/DocumentedEvent.js index f92b36d2b..0641b23b8 100644 --- a/docs/generator/types/DocumentedEvent.js +++ b/docs/generator/types/DocumentedEvent.js @@ -55,9 +55,11 @@ class DocumentedEvent extends DocumentedItem { this.directData = data; this.directData.meta = new DocumentedItemMeta(this, data.meta); const newParams = []; + data.params = data.params || []; for (const param of data.params) { newParams.push(new DocumentedParam(this, param)); } + this.directData.params = newParams; } serialize() { From cbb74e11d1ed7e3c8ff6e7855dda6a8c8ff0224e Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 14:57:09 +0100 Subject: [PATCH 129/324] version bump gen version --- docs/docs.json | 2 +- docs/generator/config.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index e1b894bc5..de1c21739 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":10,"date":1471874103869},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":25,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"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":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}}]} \ No newline at end of file +{"meta":{"version":11,"date":1471874233212},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":25,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"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":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}}]} \ No newline at end of file diff --git a/docs/generator/config.json b/docs/generator/config.json index e6c07de1b..818441893 100644 --- a/docs/generator/config.json +++ b/docs/generator/config.json @@ -1,4 +1,4 @@ { - "GEN_VERSION": 10, + "GEN_VERSION": 11, "COMPRESS": false } \ No newline at end of file From be7ed4077a8683aac1a7feb3a2039e567cb2779c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 17:03:36 +0100 Subject: [PATCH 130/324] Add custom file support to new docs --- docs/custom/index.js | 4 ++-- docs/docs.json | 2 +- docs/generator/config.json | 2 +- docs/generator/documentation.js | 4 +++- docs/generator/generator.js | 3 ++- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/custom/index.js b/docs/custom/index.js index 15fe93bb7..701c76656 100644 --- a/docs/custom/index.js +++ b/docs/custom/index.js @@ -6,9 +6,9 @@ const categories = {}; for (const file of files) { file.category = file.category.toLowerCase(); if (!categories[file.category]) { - categories[file.category] = {}; + categories[file.category] = []; } - categories[file.category][file.name] = file.data; + categories[file.category].push(file); } module.exports = categories; diff --git a/docs/docs.json b/docs/docs.json index de1c21739..2f4661792 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":11,"date":1471874233212},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":25,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"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":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}}]} \ No newline at end of file +{"meta":{"version":11,"date":1471881721884},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":25,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"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":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file diff --git a/docs/generator/config.json b/docs/generator/config.json index 818441893..e8c278fd2 100644 --- a/docs/generator/config.json +++ b/docs/generator/config.json @@ -1,4 +1,4 @@ { - "GEN_VERSION": 11, + "GEN_VERSION": 12, "COMPRESS": false } \ No newline at end of file diff --git a/docs/generator/documentation.js b/docs/generator/documentation.js index 9eb34b827..7ecb4a738 100644 --- a/docs/generator/documentation.js +++ b/docs/generator/documentation.js @@ -8,10 +8,11 @@ const DocumentedEvent = require('./types/DocumentedEvent'); const GEN_VERSION = require('./config.json').GEN_VERSION; class Documentation { - constructor(items) { + constructor(items, custom) { this.classes = new Map(); this.interfaces = new Map(); this.typedefs = new Map(); + this.custom = custom; this.parse(items); } @@ -104,6 +105,7 @@ class Documentation { classes: Array.from(this.classes.values()).map(c => c.serialize()), interfaces: Array.from(this.interfaces.values()).map(i => i.serialize()), typedefs: Array.from(this.typedefs.values()).map(t => t.serialize()), + custom: this.custom, }; return serialized; } diff --git a/docs/generator/generator.js b/docs/generator/generator.js index 0c478522c..d6ce73dfb 100644 --- a/docs/generator/generator.js +++ b/docs/generator/generator.js @@ -5,12 +5,13 @@ const DocumentationScanner = require('./doc-scanner'); const Documentation = require('./documentation'); const fs = require('fs-extra'); const zlib = require('zlib'); +const custom = require('../custom/index'); const docScanner = new DocumentationScanner(this); function parseDocs(json) { console.log(`${json.length} items found`); - const documentation = new Documentation(json); + const documentation = new Documentation(json, custom); console.log('serializing'); let output = JSON.stringify(documentation.serialize(), null, 0); if (compress) { From 115850ad048a976a58e0dc099e9d9f78a63ecb62 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 18:04:22 +0100 Subject: [PATCH 131/324] Fix `channelMessage` endpoint --- src/util/Constants.js | 2 +- test/random.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/Constants.js b/src/util/Constants.js index acabd1046..c324d1565 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -76,7 +76,7 @@ const Endpoints = exports.Endpoints = { channelInvites: (channelID) => `${Endpoints.channel(channelID)}/invites`, channelTyping: (channelID) => `${Endpoints.channel(channelID)}/typing`, channelPermissions: (channelID) => `${Endpoints.channel(channelID)}/permissions`, - channelMessage: (channelID, messageID) => `${Endpoints.channelMessage(channelID)}/${messageID}`, + channelMessage: (channelID, messageID) => `${Endpoints.channelMessages(channelID)}/${messageID}`, }; exports.OPCodes = { diff --git a/test/random.js b/test/random.js index 2d9f9e2dd..7a8cb622f 100644 --- a/test/random.js +++ b/test/random.js @@ -126,7 +126,7 @@ client.on('message', message => { m += `I am aware of ${client.channels.size} channels overall\n`; m += `I am aware of ${client.guilds.size} guilds overall\n`; m += `I am aware of ${client.users.size} users overall\n`; - message.channel.sendMessage(m); + message.channel.sendMessage(m).then(msg => msg.edit('nah')).catch(console.log); } if (message.content === 'messageme!') { From 00505d099a85065b50131cfa506dd87d86b1b100 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 18:07:10 +0100 Subject: [PATCH 132/324] change type of Client.options --- src/client/Client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/Client.js b/src/client/Client.js index 547163e7f..7ada15f28 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -19,7 +19,7 @@ class Client extends EventEmitter { /** * Creates an instance of Client. - * @param {Object} [options] options to pass to the client + * @param {ClientOptions} [options] options to pass to the client */ constructor(options) { super(); From 6f2caffd3286ba315629f2a31fc9a089d7c31e67 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 18:47:21 +0100 Subject: [PATCH 133/324] Add setting channel overwrites --- src/client/ClientDataResolver.js | 2 +- src/client/rest/RESTMethods.js | 8 ++++ src/structures/GuildChannel.js | 73 +++++++++++++++++++++++++++++--- test/random.js | 10 +++++ 4 files changed, 87 insertions(+), 6 deletions(-) diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index 3b0c8d553..b588ff277 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -38,7 +38,7 @@ class ClientDataResolver { if (user instanceof User) { return user; } else if ($string(user)) { - return this.client.users.get(user.id); + return this.client.users.get(user); } else if (user instanceof Message) { return user.author; } else if (user instanceof Guild) { diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 0f2038e54..7dc22e105 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -284,6 +284,14 @@ class RESTMethods { }); } + setChannelOverwrite(channel, payload) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('put', `${Constants.Endpoints.channelPermissions(channel.id)}/${payload.id}`, true, payload) + .then(resolve) + .catch(reject); + }); + } + updateGuildRole(role, _data) { return new Promise((resolve, reject) => { /* diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index a9779fe2c..603c665a7 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -1,5 +1,6 @@ const Channel = require('./Channel'); const PermissionOverwrites = require('./PermissionOverwrites'); +const Role = require('./Role'); const EvaluatedPermissions = require('./EvaluatedPermissions'); const Constants = require('../util/Constants'); @@ -56,13 +57,13 @@ class GuildChannel extends Channel { this.lastMessageID = data.last_message_id; this.ow = data.permission_overwrites; /** - * A list of permission overwrites in this channel for roles and users. - * @type {Array} + * A map of permission overwrites in this channel for roles and users. + * @type {Map} */ - this.permissionOverwrites = []; + this.permissionOverwrites = new Map(); if (data.permission_overwrites) { for (const overwrite of data.permission_overwrites) { - this.permissionOverwrites.push(new PermissionOverwrites(this, overwrite)); + this.permissionOverwrites.set(overwrite.id, new PermissionOverwrites(this, overwrite)); } } } @@ -84,7 +85,7 @@ class GuildChannel extends Channel { if (base) { if (other.permission_overwrites) { - const thisIDSet = this.permissionOverwrites.map(overwrite => overwrite.id); + const thisIDSet = Array.from(this.permissionOverwrites.keys()); const otherIDSet = other.permission_overwrites.map(overwrite => overwrite.id); if (arraysEqual(thisIDSet, otherIDSet)) { base = true; @@ -161,6 +162,68 @@ class GuildChannel extends Channel { return []; } + /** + * An object mapping permission flags to `true` (enabled) or `false` (disabled) + * ```js + * { + * 'SEND_MESSAGES': true, + * 'ATTACH_FILES': false, + * } + * ``` + * @typedef {(number|string)} PermissionOverwriteOptions + * @example + * // overwrite permissions for a message author + * message.channel.overwritePermissions(message.author, { + * SEND_MESSAGES: false + * }) + * .then(() => console.log('Done!')) + * .catch(console.log); + */ + + /** + * Overwrites the permissions for a user or role in this channel. + * @param {Role|UserResolvable} userOrRole the user or role to update + * @param {PermissionOverwriteOptions} config the configuration for the update + * @returns {Promise} + */ + overwritePermissions(userOrRole, options) { + const payload = { + allow: 0, + deny: 0, + }; + + if (userOrRole instanceof Role) { + payload.type = 'role'; + } else { + userOrRole = this.client.resolver.resolveUser(userOrRole); + payload.type = 'member'; + if (!userOrRole) { + return Promise.reject('supplied parameter was neither a user or a role'); + } + } + + payload.id = userOrRole.id; + + const prevOverwrite = this.permissionOverwrites.get(userOrRole.id); + + if (prevOverwrite) { + payload.allow = prevOverwrite.allow; + payload.deny = prevOverwrite.deny; + } + + for (const perm in options) { + if (options[perm] === true) { + payload.allow |= (Constants.PermissionFlags[perm] || 0); + payload.deny &= ~(Constants.PermissionFlags[perm] || 0); + } else if (options[perm] === false) { + payload.allow &= ~(Constants.PermissionFlags[perm] || 0); + payload.deny |= (Constants.PermissionFlags[perm] || 0); + } + } + + return this.client.rest.methods.setChannelOverwrite(this, payload); + } + edit(data) { return this.client.rest.methods.updateChannel(this, data); } diff --git a/test/random.js b/test/random.js index 7a8cb622f..0404a83d5 100644 --- a/test/random.js +++ b/test/random.js @@ -181,5 +181,15 @@ client.on('message', message => { if (message.content === '?perms?') { console.log(message.author.username, 'asked for perms in', message.channel.name, ':'); console.log(message.channel.permissionsFor(message.author).serialize()); + } else if (message.content === '???test???') { + message.channel.overwritePermissions('', { + SEND_MESSAGES: false, + }) + .then(() => { + message.channel.overwritePermissions('', { + SEND_MESSAGES: true, + }); + }) + .catch(console.log); } }); From 85fd82818f86a8acbb09955f4e36a3706e576c06 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 18:47:38 +0100 Subject: [PATCH 134/324] Pass ESlint --- src/structures/GuildChannel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 603c665a7..17e867a64 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -205,7 +205,7 @@ class GuildChannel extends Channel { payload.id = userOrRole.id; const prevOverwrite = this.permissionOverwrites.get(userOrRole.id); - + if (prevOverwrite) { payload.allow = prevOverwrite.allow; payload.deny = prevOverwrite.deny; From c294a0fac4dcb75883d91e61d9a70cdafb676887 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 18:48:31 +0100 Subject: [PATCH 135/324] Move example to right place --- src/structures/GuildChannel.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 17e867a64..afd6dedcb 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -171,13 +171,6 @@ class GuildChannel extends Channel { * } * ``` * @typedef {(number|string)} PermissionOverwriteOptions - * @example - * // overwrite permissions for a message author - * message.channel.overwritePermissions(message.author, { - * SEND_MESSAGES: false - * }) - * .then(() => console.log('Done!')) - * .catch(console.log); */ /** @@ -185,6 +178,13 @@ class GuildChannel extends Channel { * @param {Role|UserResolvable} userOrRole the user or role to update * @param {PermissionOverwriteOptions} config the configuration for the update * @returns {Promise} + * @example + * // overwrite permissions for a message author + * message.channel.overwritePermissions(message.author, { + * SEND_MESSAGES: false + * }) + * .then(() => console.log('Done!')) + * .catch(console.log); */ overwritePermissions(userOrRole, options) { const payload = { From 698675257856b0f7a2802c057204716435880e53 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 18:49:13 +0100 Subject: [PATCH 136/324] Build docs --- docs/docs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 2f4661792..7ceceb057 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":11,"date":1471881721884},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":25,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"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":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":76,"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#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":108,"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#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.log);"],"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.log);"],"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.log);"],"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":220,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":41,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":46,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":51,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Array",".<"],["PermissionOverwrites",">"]]]},"meta":{"line":62,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471888146576},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":77,"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#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":109,"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.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":241,"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.log);"],"meta":{"line":255,"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.log);"],"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"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":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":[[["number",""]],[["string",""]]]},"meta":{"line":165,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file From 89569d924932001cfde080498bdaab7e86090b64 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 18:54:33 +0100 Subject: [PATCH 137/324] fix docs yet again --- docs/docs.json | 2 +- src/structures/GuildChannel.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 7ceceb057..462a3a7ef 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471888146576},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":77,"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#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":109,"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.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":241,"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.log);"],"meta":{"line":255,"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.log);"],"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"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":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":[[["number",""]],[["string",""]]]},"meta":{"line":165,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471888464021},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":77,"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#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":109,"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.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":241,"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.log);"],"meta":{"line":255,"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.log);"],"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"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":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":165,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index afd6dedcb..39c562230 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -170,7 +170,7 @@ class GuildChannel extends Channel { * 'ATTACH_FILES': false, * } * ``` - * @typedef {(number|string)} PermissionOverwriteOptions + * @typedef {Object} PermissionOverwriteOptions */ /** From df456589abd4acfb730c9414f4e68d1519293b64 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 19:15:08 +0100 Subject: [PATCH 138/324] Fix requests getting locked up in queues --- docs/docs.json | 2 +- src/client/rest/RESTManager.js | 2 +- src/client/rest/RequestHandlers/Sequential.js | 12 +++++++--- test/random.js | 22 +++++++------------ 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 462a3a7ef..42e404edf 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471888464021},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":77,"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#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":109,"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.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":241,"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.log);"],"meta":{"line":255,"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.log);"],"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"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":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":165,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471889696576},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":77,"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#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":109,"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.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":241,"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.log);"],"meta":{"line":255,"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.log);"],"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"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":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":165,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTManager.js b/src/client/rest/RESTManager.js index 87731fca3..716b30279 100644 --- a/src/client/rest/RESTManager.js +++ b/src/client/rest/RESTManager.js @@ -39,7 +39,7 @@ class RESTManager { if (!this.handlers[apiRequest.getEndpoint()]) { const RequestHandlerType = this.getRequestHandler(); - this.handlers[apiRequest.getEndpoint()] = new RequestHandlerType(this); + this.handlers[apiRequest.getEndpoint()] = new RequestHandlerType(this, apiRequest.getEndpoint()); } return this.push(this.handlers[apiRequest.getEndpoint()], apiRequest); diff --git a/src/client/rest/RequestHandlers/Sequential.js b/src/client/rest/RequestHandlers/Sequential.js index 55d042880..5efe1aee4 100644 --- a/src/client/rest/RequestHandlers/Sequential.js +++ b/src/client/rest/RequestHandlers/Sequential.js @@ -9,8 +9,8 @@ const RequestHandler = require('./RequestHandler'); */ class SequentialRequestHandler extends RequestHandler { - constructor(restManager) { - super(restManager); + constructor(restManager, endpoint) { + super(restManager, endpoint); /** * Whether this rate limiter is waiting for a response from a request @@ -18,6 +18,12 @@ class SequentialRequestHandler extends RequestHandler { */ this.waiting = false; + /** + * The endpoint that this handler is handling + * @type {String} + */ + this.endpoint = endpoint; + /** * The time difference between Discord's Dates and the local computer's Dates. A positive number means the local * computer's time is ahead of Discord's. @@ -51,7 +57,7 @@ class SequentialRequestHandler extends RequestHandler { this.waiting = false; this.globalLimit = false; resolve(); - }, res.headers['retry-after'] + 500); + }, Number(res.headers['retry-after']) + 500); if (res.headers['x-ratelimit-global']) { this.globalLimit = true; } diff --git a/test/random.js b/test/random.js index 0404a83d5..1c4d22705 100644 --- a/test/random.js +++ b/test/random.js @@ -177,19 +177,13 @@ client.on('messageUpdate', (old, message) => { console.log('Message updated from', old.content, 'to', message.content); }); -client.on('message', message => { - if (message.content === '?perms?') { - console.log(message.author.username, 'asked for perms in', message.channel.name, ':'); - console.log(message.channel.permissionsFor(message.author).serialize()); - } else if (message.content === '???test???') { - message.channel.overwritePermissions('', { - SEND_MESSAGES: false, - }) - .then(() => { - message.channel.overwritePermissions('', { - SEND_MESSAGES: true, - }); - }) - .catch(console.log); +client.on('message', msg => { + if (msg.content.startsWith('yoing')) { + let startTime = Date.now(); + msg.channel.sendMessage("Let's see if this works") + .then(message => { + let endTime = Date.now(); + message.edit(`Ping took ${(endTime - startTime).toFixed(3)} ms. I think.`).catch(console.error); + }).catch(console.error); } }); From 6ad970e311862e6c4c23a59de17a81299d7211b7 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 19:25:19 +0100 Subject: [PATCH 139/324] Removed unused dependencies --- docs/docs.json | 2 +- package.json | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 42e404edf..c07552c7a 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471889696576},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":77,"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#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":109,"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.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":241,"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.log);"],"meta":{"line":255,"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.log);"],"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"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":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":165,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471890281444},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":77,"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#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":109,"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.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":241,"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.log);"],"meta":{"line":255,"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.log);"],"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"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":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":165,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file diff --git a/package.json b/package.json index 605c781a7..397d9f313 100644 --- a/package.json +++ b/package.json @@ -26,27 +26,12 @@ }, "homepage": "https://github.com/hydrabolt/discord.js#readme", "dependencies": { - "babel-plugin-transform-runtime": "^6.6.0", "object.values": "^1.0.3", "superagent": "^1.5.0", - "unpipe": "^1.0.0", "ws": "^1.1.1" }, "devDependencies": { - "babel-preset-es2015": "^6.6.0", - "babel-preset-stage-3": "^6.5.0", - "eslint": "^3.3.0", - "eslint-config-airbnb": "^10.0.1", - "eslint-plugin-import": "^1.13.0", - "eslint-plugin-jsx-a11y": "^2.1.0", - "eslint-plugin-react": "^6.0.0", "fs-extra": "^0.30.0", - "grunt": "^0.4.5", - "grunt-babel": "^6.0.0", - "grunt-browserify": "^4.0.1", - "grunt-contrib-uglify": "^0.11.0", - "grunt-jscs": "^2.8.0", - "jscs": "^2.11.0", "jsdoc-parse": "^1.2.7", "load-grunt-tasks": "^3.3.0" }, From 59cc02de89880f5e3a083cb7ff68abea9c1a56b6 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 19:29:02 +0100 Subject: [PATCH 140/324] Remove lastMessageID from voiceChannel --- docs/docs.json | 2 +- src/structures/GuildChannel.js | 5 ----- src/structures/TextChannel.js | 9 +++++++++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index c07552c7a..e3179987e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471890281444},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":77,"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#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":109,"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.log);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":241,"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.log);"],"meta":{"line":255,"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.log);"],"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"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":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":77,"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#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":109,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":241,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":255,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":269,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":283,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":63,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":165,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471890532536},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 39c562230..55c430e70 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -50,11 +50,6 @@ class GuildChannel extends Channel { * @type {String} */ this.name = data.name; - /** - * The ID of the last message in the channel, if one was sent. - * @type {?String} - */ - this.lastMessageID = data.last_message_id; this.ow = data.permission_overwrites; /** * A map of permission overwrites in this channel for roles and users. diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 9df132319..d64fc7e89 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -13,6 +13,15 @@ class TextChannel extends GuildChannel { this.messages = new Map(); } + setup(data) { + super.setup(data); + /** + * The ID of the last message in the channel, if one was sent. + * @type {?String} + */ + this.lastMessageID = data.last_message_id; + } + sendMessage() { return; } From cf34f253cb58f818ad294918011cae9c642c3ec8 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 19:45:27 +0100 Subject: [PATCH 141/324] Change message.mentions to a Map --- docs/docs.json | 2 +- src/structures/Message.js | 14 +++++++------- test/random.js | 18 +++++++++++------- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index e3179987e..4bea79c9e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471890532536},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A list of users mentioned in the message","memberof":"Message","type":{"types":[[["Array",".<"],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471891493485},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A map of users mentioned in the message, the key is the user ID.","memberof":"Message","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file diff --git a/src/structures/Message.js b/src/structures/Message.js index 5baa588c5..457281b95 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -74,10 +74,10 @@ class Message { */ this.attachments = data.attachments; /** - * A list of users mentioned in the message - * @type {Array} + * A map of users mentioned in the message, the key is the user ID. + * @type {Map} */ - this.mentions = []; + this.mentions = new Map(); /** * The ID of the message (unique in the channel it was sent) * @type {String} @@ -86,10 +86,10 @@ class Message { for (const mention of data.mentions) { let user = this.client.users.get(mention.id); if (user) { - this.mentions.push(user); + this.mentions.set(user.id, user); } else { user = this.client.dataManager.newUser(mention); - this.mentions.push(user); + this.mentions.set(user.id, user); } } } @@ -126,10 +126,10 @@ class Message { for (const mention of data.mentions) { let user = this.client.users.get(mention.id); if (user) { - this.mentions.push(user); + this.mentions.set(user.id, user); } else { user = this.client.dataManager.newUser(mention); - this.mentions.push(user); + this.mentions.set(user.id, user); } } } diff --git a/test/random.js b/test/random.js index 1c4d22705..3d6f0f844 100644 --- a/test/random.js +++ b/test/random.js @@ -178,12 +178,16 @@ client.on('messageUpdate', (old, message) => { }); client.on('message', msg => { - if (msg.content.startsWith('yoing')) { - let startTime = Date.now(); - msg.channel.sendMessage("Let's see if this works") - .then(message => { - let endTime = Date.now(); - message.edit(`Ping took ${(endTime - startTime).toFixed(3)} ms. I think.`).catch(console.error); - }).catch(console.error); + if (msg.content.startsWith('?raw')) { + msg.channel.sendMessage('```' + msg.content + '```'); + } + + if (msg.content.startsWith('?eval') && msg.author.id === '66564597481480192') { + try { + const com = eval(msg.content.split(" ").slice(1).join(" ")); + msg.channel.sendMessage('```\n' + com + '```'); + } catch(e) { + msg.channel.sendMessage('```\n' + e + '```'); + } } }); From 357502e520e48ba481a0965d87df171d721a5ddf Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 19:52:55 +0100 Subject: [PATCH 142/324] Fix user.status --- docs/docs.json | 2 +- src/client/ClientDataManager.js | 3 +++ src/structures/DMChannel.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 4bea79c9e..e20397ff8 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471891493485},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A map of users mentioned in the message, the key is the user ID.","memberof":"Message","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471891928705},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A map of users mentioned in the message, the key is the user ID.","memberof":"Message","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file diff --git a/src/client/ClientDataManager.js b/src/client/ClientDataManager.js index f9d859145..973cd0122 100644 --- a/src/client/ClientDataManager.js +++ b/src/client/ClientDataManager.js @@ -34,6 +34,9 @@ class ClientDataManager { } newUser(data) { + if (this.client.users.get(data.id)) { + return this.client.users.get(data.id); + } const user = new User(this.client, data); this.client.users.set(user.id, user); return user; diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 958ea21da..6b86e2cf9 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -15,7 +15,7 @@ class DMChannel extends Channel { setup(data) { super.setup(data); - const recipient = new User(this.client, data.recipients[0]); + const recipient = this.client.users.get(data.recipients[0].id) || new User(this.client, data.recipients[0]); /** * The recipient on the other end of the DM * @type {User} From dd40b870d56e28de720dbc8960adee994ada99c4 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 20:46:56 +0100 Subject: [PATCH 143/324] Add message.pinned --- docs/docs.json | 2 +- src/structures/Message.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index e20397ff8..89ed166a7 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471891928705},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":150,"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#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.log);"],"meta":{"line":184,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":198,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A map of users mentioned in the message, the key is the user ID.","memberof":"Message","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"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":85,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471895193944},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":155,"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#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.log);"],"meta":{"line":189,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":203,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A map of users mentioned in the message, the key is the user ID.","memberof":"Message","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":85,"file":"Message.js","path":"src/structures"}},{"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":90,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file diff --git a/src/structures/Message.js b/src/structures/Message.js index 457281b95..b44585563 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -28,6 +28,11 @@ class Message { } setup(data) { + /** + * Whether or not this message is pinned + * @type {Boolean} + */ + this.pinned = data.pinned; /** * The author of the message * @type {User} From 8fed1b1d80d941b09a2848348c5b74cbaec3ba97 Mon Sep 17 00:00:00 2001 From: Hyper-Coder Date: Mon, 22 Aug 2016 15:48:19 -0400 Subject: [PATCH 144/324] Add setStatus function --- src/structures/ClientUser.js | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 089521aa8..81e6995f8 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -64,6 +64,7 @@ class ClientUser extends User { setPassword(password) { return this.client.rest.methods.updateCurrentUser({ password }); } + /** * Set the avatar of the logged in Client. * @param {Base64Resolvable} avatar the new avatar @@ -78,6 +79,43 @@ class ClientUser extends User { return this.client.rest.methods.updateCurrentUser({ avatar }); } + /** + * Set the playing status of the logged in client. + * @param {String} status + * @param {String} game + * @returns {Promise} + * @example + * // set status + * client.user.setStatus('status', 'game') + * .then(user => console.log('Changed status!')) + * .catch(console.log); + */ + setStatus(status, game) { + if (status === "online" || status === "here" || status === "available") { + this.idleStatus = null; + } else if (status === "idle" || status === "away") { + this.idleStatus = Date.now(); + } else { + this.idleStatus = this.idleStatus || null; + } + + if (typeof game === "string" && !game.length) game = null; + this.userGame = game === null ? null : !game ? this.userGame || null : typeof game === "string" ? {name: game} : game; + + this.client.ws.send({ + op: 3, + d: { + idle_since: this.idleStatus, + game: this.userGame + } + }); + + this.status = this.idleStatus ? "idle" : "online"; + this.game = this.userGame; + + return Promise.resolve(); + } + edit(data) { return this.client.rest.methods.updateCurrentUser(data); } From fb2392a1edd2129d10ee6f86bb6f05b7c6a3f461 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 21:00:03 +0100 Subject: [PATCH 145/324] minor fixes to ClientUser.setStatus --- docs/docs.json | 2 +- src/structures/ClientUser.js | 60 +++++++++++++++++++++--------------- 2 files changed, 36 insertions(+), 26 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 89ed166a7..ccf3711e0 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471895193944},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":77,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"the new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":155,"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#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.log);"],"meta":{"line":189,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":203,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A map of users mentioned in the message, the key is the user ID.","memberof":"Message","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":85,"file":"Message.js","path":"src/structures"}},{"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":90,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471895989521},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":155,"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#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.log);"],"meta":{"line":189,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":203,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A map of users mentioned in the message, the key is the user ID.","memberof":"Message","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":85,"file":"Message.js","path":"src/structures"}},{"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":90,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 81e6995f8..53f430c9e 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -80,10 +80,10 @@ class ClientUser extends User { } /** - * Set the playing status of the logged in client. - * @param {String} status - * @param {String} game - * @returns {Promise} + * Set the status and playing game of the logged in client. + * @param {String} [status] the status, can be `online` or `idle`. + * @param {String|Object} [game] the game that is being played + * @returns {Promise} * @example * // set status * client.user.setStatus('status', 'game') @@ -91,29 +91,39 @@ class ClientUser extends User { * .catch(console.log); */ setStatus(status, game) { - if (status === "online" || status === "here" || status === "available") { - this.idleStatus = null; - } else if (status === "idle" || status === "away") { - this.idleStatus = Date.now(); - } else { - this.idleStatus = this.idleStatus || null; - } - - if (typeof game === "string" && !game.length) game = null; - this.userGame = game === null ? null : !game ? this.userGame || null : typeof game === "string" ? {name: game} : game; - - this.client.ws.send({ - op: 3, - d: { - idle_since: this.idleStatus, - game: this.userGame + return new Promise(resolve => { + if (status === 'online' || status === 'here' || status === 'available') { + this.idleStatus = null; + } else if (status === 'idle' || status === 'away') { + this.idleStatus = Date.now(); + } else { + this.idleStatus = this.idleStatus || null; } + + if (typeof game === 'string' && !game.length) game = null; + + if (game === null) { + this.userGame = null; + } else if (!game) { + this.userGame = this.userGame || null; + } else if (typeof game === 'string') { + this.userGame = { name: game }; + } else { + this.userGame = game; + } + + this.client.ws.send({ + op: 3, + d: { + idle_since: this.idleStatus, + game: this.userGame, + }, + }); + + this.status = this.idleStatus ? 'idle' : 'online'; + this.game = this.userGame; + resolve(this); }); - - this.status = this.idleStatus ? "idle" : "online"; - this.game = this.userGame; - - return Promise.resolve(); } edit(data) { From 3fded1d7af56f67fef45db26e2e6bc3e392a9e35 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 21:31:43 +0100 Subject: [PATCH 146/324] Add Sharding Support! --- docs/docs.json | 2 +- docs/generator/types/DocumentedConstructor.js | 18 +++++++++++-- src/client/websocket/WebSocketManager.js | 3 +++ src/util/Constants.js | 27 +++++++++++++++++++ test/random.js | 5 +++- 5 files changed, 51 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index ccf3711e0..e6b8ec67f 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471895989521},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client"},"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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":181,"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":200,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":155,"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#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.log);"],"meta":{"line":189,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":203,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A map of users mentioned in the message, the key is the user ID.","memberof":"Message","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":85,"file":"Message.js","path":"src/structures"}},{"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":90,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471897754508},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":155,"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#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.log);"],"meta":{"line":189,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":203,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A map of users mentioned in the message, the key is the user ID.","memberof":"Message","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":85,"file":"Message.js","path":"src/structures"}},{"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":90,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file diff --git a/docs/generator/types/DocumentedConstructor.js b/docs/generator/types/DocumentedConstructor.js index 136e11428..db12c9480 100644 --- a/docs/generator/types/DocumentedConstructor.js +++ b/docs/generator/types/DocumentedConstructor.js @@ -1,4 +1,5 @@ const DocumentedItem = require('./DocumentedItem'); +const DocumentedParam = require('./DocumentedParam'); /* { id: 'Client()', @@ -18,13 +19,26 @@ const DocumentedItem = require('./DocumentedItem'); class DocumentedConstructor extends DocumentedItem { registerMetaInfo(data) { + super.registerMetaInfo(data); this.directData = data; + const newParams = []; + for (const param of data.params) { + newParams.push(new DocumentedParam(this, param)); + } + this.directData.params = newParams; } serialize() { super.serialize(); - const { id, name, description, memberof, access } = this.directData; - return { id, name, description, memberof, access }; + const { id, name, description, memberof, access, params } = this.directData; + return { + id, + name, + description, + memberof, + access, + params: params.map(p => p.serialize()) + }; } } diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 0e077cf55..7295f7b0d 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -112,6 +112,9 @@ class WebSocketManager { this.reconnecting = false; const payload = this.client.options.ws; payload.token = this.client.token; + if (this.client.options.shard_count > 0) { + payload.shard = [this.client.options.shard_id, this.client.options.shard_count]; + } this.send({ op: Constants.OPCodes.IDENTIFY, diff --git a/src/util/Constants.js b/src/util/Constants.js index c324d1565..bc3cceff5 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -1,3 +1,28 @@ +/** + * Options that can be passed to a client: + * ```js + * { + * ws: { + * large_threshold: 250, + * compress: true, + * properties: { + * $os: process ? process.platform : 'discord.js', + * $browser: 'discord.js', + * $device: 'discord.js', + * $referrer: '', + * $referring_domain: '', + * }, + * }, + * protocol_version: 6, + * max_message_cache: 200, + * rest_ws_bridge_timeout: 5000, + * api_request_method: 'sequential', + * shard_id: 0, + * shard_count: 0, + * }; + * ``` + * @typedef {Object} ClientOptions + */ exports.DefaultOptions = { ws: { large_threshold: 250, @@ -14,6 +39,8 @@ exports.DefaultOptions = { max_message_cache: 200, rest_ws_bridge_timeout: 5000, api_request_method: 'sequential', + shard_id: 0, + shard_count: 0, }; exports.Status = { diff --git a/test/random.js b/test/random.js index 3d6f0f844..e7d1d8d44 100644 --- a/test/random.js +++ b/test/random.js @@ -3,7 +3,10 @@ const Discord = require('../'); const request = require('superagent'); -const client = new Discord.Client(); +const client = new Discord.Client({ + shard_id: 0, + shard_count: 2, +}); client.login(require('./auth.json').token).then(token => console.log('logged in with token ' + token)).catch(console.log); From c308a2a01c2d52c6d32c8711e63ded8dee7cf676 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 21:44:01 +0100 Subject: [PATCH 147/324] Update docs for Client --- docs/docs.json | 2 +- docs/generator/types/DocumentedConstructor.js | 2 +- src/client/Client.js | 7 ++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index e6b8ec67f..0e011aa56 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471897754508},"classes":[{"id":"Client","name":"Client","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"line":18,"file":"Client.js","path":"src/client"},"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":120,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":68,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":73,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":78,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":83,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":88,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":98,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":155,"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#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.log);"],"meta":{"line":189,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":203,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A map of users mentioned in the message, the key is the user ID.","memberof":"Message","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":85,"file":"Message.js","path":"src/structures"}},{"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":90,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471898617559},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":15,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":117,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":65,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":70,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":75,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":80,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":85,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":95,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":155,"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#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.log);"],"meta":{"line":189,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":203,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A map of users mentioned in the message, the key is the user ID.","memberof":"Message","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":85,"file":"Message.js","path":"src/structures"}},{"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":90,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file diff --git a/docs/generator/types/DocumentedConstructor.js b/docs/generator/types/DocumentedConstructor.js index db12c9480..e539bf642 100644 --- a/docs/generator/types/DocumentedConstructor.js +++ b/docs/generator/types/DocumentedConstructor.js @@ -37,7 +37,7 @@ class DocumentedConstructor extends DocumentedItem { description, memberof, access, - params: params.map(p => p.serialize()) + params: params.map(p => p.serialize()), }; } diff --git a/src/client/Client.js b/src/client/Client.js index 7ada15f28..bb015efd6 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -9,11 +9,8 @@ const WebSocketManager = require('./websocket/WebSocketManager'); const ActionsManager = require('./actions/ActionsManager'); /** - * Creates a new Discord Client - * ```js - * const Discord = require("discord.js"); - * const client = new Discord.Client(); - * ``` + * The starting point for making a Discord Bot. + * @extends {EventEmitter} */ class Client extends EventEmitter { From c96ecec24cf2fd2711b4632b8f8e4add6db5bdb2 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 22:31:22 +0100 Subject: [PATCH 148/324] Fix recipient resolution --- docs/docs.json | 2 +- src/client/ClientDataManager.js | 2 +- src/structures/DMChannel.js | 2 +- test/random.js | 5 +---- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 0e011aa56..9a67b85b7 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471898617559},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":15,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":117,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":65,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":70,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":75,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":80,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":85,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":95,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":155,"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#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.log);"],"meta":{"line":189,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":203,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A map of users mentioned in the message, the key is the user ID.","memberof":"Message","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":85,"file":"Message.js","path":"src/structures"}},{"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":90,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471901482123},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":15,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":117,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":65,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":70,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":75,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":80,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":85,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":95,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":155,"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#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.log);"],"meta":{"line":189,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":203,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A map of users mentioned in the message, the key is the user ID.","memberof":"Message","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":85,"file":"Message.js","path":"src/structures"}},{"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":90,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file diff --git a/src/client/ClientDataManager.js b/src/client/ClientDataManager.js index 973cd0122..96f1fa427 100644 --- a/src/client/ClientDataManager.js +++ b/src/client/ClientDataManager.js @@ -49,7 +49,7 @@ class ClientDataManager { if (data.type === Constants.ChannelTypes.DM) { channel = new DMChannel(this.client, data); } else { - guild = guild || this.get('guilds', data.guild_id); + guild = guild || this.client.guilds.get(data.guild_id); if (guild) { if (data.type === Constants.ChannelTypes.text) { channel = new TextChannel(guild, data); diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 6b86e2cf9..00c9b8dfb 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -20,7 +20,7 @@ class DMChannel extends Channel { * The recipient on the other end of the DM * @type {User} */ - this.recipient = this.client.users.set(recipient.id, recipient); + this.recipient = recipient; /** * The ID of the last sent message, if available * @type {?String} diff --git a/test/random.js b/test/random.js index e7d1d8d44..3d6f0f844 100644 --- a/test/random.js +++ b/test/random.js @@ -3,10 +3,7 @@ const Discord = require('../'); const request = require('superagent'); -const client = new Discord.Client({ - shard_id: 0, - shard_count: 2, -}); +const client = new Discord.Client(); client.login(require('./auth.json').token).then(token => console.log('logged in with token ' + token)).catch(console.log); From ddd3ea9727ab419f760bb16402f62687c775937d Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 22:45:02 +0100 Subject: [PATCH 149/324] Fixed Guild Role Delete Handling --- src/client/actions/GuildRoleDelete.js | 2 +- src/structures/Message.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/client/actions/GuildRoleDelete.js b/src/client/actions/GuildRoleDelete.js index e5a8db0fc..078cdcbb7 100644 --- a/src/client/actions/GuildRoleDelete.js +++ b/src/client/actions/GuildRoleDelete.js @@ -16,7 +16,7 @@ class GuildRoleDeleteAction extends Action { if (guild) { let exists = guild.roles.get(data.role_id); if (exists) { - guild.roles.remove(data.role_id); + guild.roles.delete(data.role_id); this.deleted[guild.id + data.role_id] = exists; this.scheduleForDeletion(guild.id, data.role_id); client.emit(Constants.Events.GUILD_ROLE_DELETE, guild, exists); diff --git a/src/structures/Message.js b/src/structures/Message.js index b44585563..092eed8cf 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -88,6 +88,12 @@ class Message { * @type {String} */ this.id = data.id; + /** + * A map of roles mentioned in the message, the key is the role ID. + * @type {Map} + */ + this.roleMentions = new Map(); + for (const mention of data.mentions) { let user = this.client.users.get(mention.id); if (user) { From 2a1799f20fbec15b8f6be28b0d9edc064b2af650 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 23:09:45 +0100 Subject: [PATCH 150/324] Move around mentions and stuff --- docs/docs.json | 2 +- docs/generator/types/DocumentedMember.js | 13 +++++++- src/structures/Message.js | 42 ++++++++++++++++-------- src/structures/Role.js | 8 +++++ 4 files changed, 50 insertions(+), 15 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 9a67b85b7..c4523c3ef 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471901482123},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":15,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":117,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":65,"file":"Client.js","path":"src/client"}},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":70,"file":"Client.js","path":"src/client"}},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":75,"file":"Client.js","path":"src/client"}},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":80,"file":"Client.js","path":"src/client"}},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":85,"file":"Client.js","path":"src/client"}},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"}},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["String",""]]]},"meta":{"line":95,"file":"Client.js","path":"src/client"}}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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"}},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":19,"file":"ClientUser.js","path":"src/structures"}},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"}},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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"}},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"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":59,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"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":195,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":200,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":205,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"file":"Guild.js","path":"src/structures"}},{"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":225,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"file":"Guild.js","path":"src/structures"}},{"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":240,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["String",""]]]},"meta":{"line":245,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["Boolean",""]]]},"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":255,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"}},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"}}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}},{"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"}},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"}}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":23,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":36,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":46,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":51,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":56,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":98,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":107,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":116,"file":"GuildMember.js","path":"src/structures"}},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["String",""]]]},"meta":{"line":125,"file":"GuildMember.js","path":"src/structures"}}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":155,"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#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.log);"],"meta":{"line":189,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":203,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"}},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"}},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"file":"Message.js","path":"src/structures"}},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":35,"file":"Message.js","path":"src/structures"}},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":55,"file":"Message.js","path":"src/structures"}},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":60,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"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"}},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"}},{"id":"Message#mentions","name":"mentions","description":"A map of users mentioned in the message, the key is the user ID.","memberof":"Message","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":85,"file":"Message.js","path":"src/structures"}},{"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":90,"file":"Message.js","path":"src/structures"}}],"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":[],"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"}},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"file":"PermissionOverwrites.js","path":"src/structures"}},{"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":26,"file":"PermissionOverwrites.js","path":"src/structures"}}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"}},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"Role.js","path":"src/structures"}},{"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":40,"file":"Role.js","path":"src/structures"}},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["String",""]]]},"meta":{"line":45,"file":"Role.js","path":"src/structures"}},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":50,"file":"Role.js","path":"src/structures"}},{"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":55,"file":"Role.js","path":"src/structures"}},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"}},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["Boolean",""]]]},"meta":{"line":70,"file":"Role.js","path":"src/structures"}}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"}},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"file":"User.js","path":"src/structures"}},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":25,"file":"User.js","path":"src/structures"}},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":30,"file":"User.js","path":"src/structures"}},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":35,"file":"User.js","path":"src/structures"}},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["Boolean",""]]]},"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"}},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"}}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":23,"file":"VoiceChannel.js","path":"src/structures"}},{"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":28,"file":"VoiceChannel.js","path":"src/structures"}},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":47,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":52,"file":"GuildChannel.js","path":"src/structures"}},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"}}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471903735691},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":15,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":117,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":65,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":70,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":75,"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":80,"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":85,"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":90,"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":95,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"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":59,"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":64,"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":195,"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":200,"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":205,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"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":215,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"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":225,"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":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"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":240,"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":245,"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":250,"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":255,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"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":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"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":47,"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":52,"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":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":177,"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#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.log);"],"meta":{"line":211,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":225,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"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":35,"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":40,"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":60,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":65,"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#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users or roles map","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]}}]},{"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":95,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"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":47,"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":52,"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":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"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":23,"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":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"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":47,"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":52,"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":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file diff --git a/docs/generator/types/DocumentedMember.js b/docs/generator/types/DocumentedMember.js index 064b8ed30..3eaddc24e 100644 --- a/docs/generator/types/DocumentedMember.js +++ b/docs/generator/types/DocumentedMember.js @@ -1,6 +1,7 @@ const DocumentedItem = require('./DocumentedItem'); const DocumentedItemMeta = require('./DocumentedItemMeta'); const DocumentedVarType = require('./DocumentedVarType'); +const DocumentedParam = require('./DocumentedParam'); /* { id: 'Client#rest', @@ -26,11 +27,20 @@ class DocumentedMember extends DocumentedItem { this.directData = data; this.directData.meta = new DocumentedItemMeta(this, data.meta); this.directData.type = new DocumentedVarType(this, data.type); + if (data.properties) { + const newProps = []; + for (const param of data.properties) { + newProps.push(new DocumentedParam(this, param)); + } + this.directData.properties = newProps; + } else { + data.properties = []; + } } serialize() { super.serialize(); - const { id, name, description, memberof, type, access, meta } = this.directData; + const { id, name, description, memberof, type, access, meta, properties } = this.directData; return { id, name, @@ -39,6 +49,7 @@ class DocumentedMember extends DocumentedItem { type: type.serialize(), access, meta: meta.serialize(), + props: properties.map(p => p.serialize()), }; } diff --git a/src/structures/Message.js b/src/structures/Message.js index 092eed8cf..c13dd3ea7 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -79,28 +79,37 @@ class Message { */ this.attachments = data.attachments; /** - * A map of users mentioned in the message, the key is the user ID. - * @type {Map} + * An object containing a further users or roles map + * @type {Object} + * @property {Map} mentions.users Mentioned users, maps their ID to the user object. + * @property {Map} mentions.roles Mentioned roles, maps their ID to the role object. */ - this.mentions = new Map(); + this.mentions = { + users: new Map(), + roles: new Map(), + }; /** * The ID of the message (unique in the channel it was sent) * @type {String} */ this.id = data.id; - /** - * A map of roles mentioned in the message, the key is the role ID. - * @type {Map} - */ - this.roleMentions = new Map(); for (const mention of data.mentions) { let user = this.client.users.get(mention.id); if (user) { - this.mentions.set(user.id, user); + this.mentions.users.set(user.id, user); } else { user = this.client.dataManager.newUser(mention); - this.mentions.set(user.id, user); + this.mentions.users.set(user.id, user); + } + } + + if (data.mention_roles) { + for (const mention of data.mention_roles) { + const role = this.channel.guild.roles.get(mention); + if (role) { + this.mentions.roles.set(role.id, role); + } } } } @@ -137,14 +146,21 @@ class Message { for (const mention of data.mentions) { let user = this.client.users.get(mention.id); if (user) { - this.mentions.set(user.id, user); + this.mentions.users.set(user.id, user); } else { user = this.client.dataManager.newUser(mention); - this.mentions.set(user.id, user); + this.mentions.users.set(user.id, user); + } + } + } + if (data.mention_roles) { + for (const mention of data.mention_roles) { + const role = this.channel.guild.roles.get(mention); + if (role) { + this.mentions.roles.set(role.id, role); } } } - if (data.id) { this.id = data.id; } diff --git a/src/structures/Role.js b/src/structures/Role.js index b67a101d3..b244ab8bf 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -213,6 +213,14 @@ class Role { return ((this.permissions & permission) > 0); } + + /** + * When concatenated with a String, this automatically concatenates the Role mention rather than the Role object. + * @returns {String} + */ + toString() { + return `<@&${this.id}>`; + } } module.exports = Role; From ce0d9a727266f3e5513d583956def6fc11d80763 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 23:37:17 +0100 Subject: [PATCH 151/324] Add message.mentions.channels --- src/structures/Message.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/structures/Message.js b/src/structures/Message.js index c13dd3ea7..07833f632 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -83,10 +83,12 @@ class Message { * @type {Object} * @property {Map} mentions.users Mentioned users, maps their ID to the user object. * @property {Map} mentions.roles Mentioned roles, maps their ID to the role object. + * @property {Map} mentions.channels Mentioned channels, maps their ID to the channel object. */ this.mentions = { users: new Map(), roles: new Map(), + channels: new Map(), }; /** * The ID of the message (unique in the channel it was sent) @@ -112,6 +114,14 @@ class Message { } } } + + if (this.channel.guild) { + const channMentionsRaw = data.content.match(/<#([0-9]{14,20})>/g) || []; + for (const raw of channMentionsRaw) { + const chan = this.channel.guild.channels.get(raw.match(/([0-9]{14,20})/g)[0]); + this.mentions.channels.set(chan.id, chan); + } + } } patch(data) { @@ -164,6 +174,13 @@ class Message { if (data.id) { this.id = data.id; } + if (this.channel.guild) { + const channMentionsRaw = data.content.match(/<#([0-9]{14,20})>/g) || []; + for (const raw of channMentionsRaw) { + const chan = this.channel.guild.channels.get(raw.match(/([0-9]{14,20})/g)[0]); + this.mentions.channels.set(chan.id, chan); + } + } } /** From 725e0a8cfe3d2a28e8afdf871f7f28366f59163f Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 22 Aug 2016 23:37:41 +0100 Subject: [PATCH 152/324] Rebuild docs --- docs/docs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index c4523c3ef..f96c20921 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471903735691},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":15,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":117,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":65,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":70,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":75,"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":80,"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":85,"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":90,"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":95,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"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":59,"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":64,"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":195,"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":200,"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":205,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"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":215,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"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":225,"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":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"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":240,"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":245,"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":250,"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":255,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"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":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"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":47,"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":52,"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":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":177,"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#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.log);"],"meta":{"line":211,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":225,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"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":35,"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":40,"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":60,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":65,"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#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users or roles map","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]}}]},{"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":95,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"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":47,"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":52,"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":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"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":23,"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":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"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":47,"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":52,"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":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471905450300},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":15,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":117,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":65,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":70,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":75,"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":80,"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":85,"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":90,"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":95,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"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":59,"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":64,"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":195,"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":200,"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":205,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"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":215,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"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":225,"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":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"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":240,"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":245,"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":250,"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":255,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"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":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"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":47,"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":52,"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":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":194,"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#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.log);"],"meta":{"line":228,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":242,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"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":35,"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":40,"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":60,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":65,"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#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users or roles map","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels, maps their ID to the channel object.","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":97,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"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":47,"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":52,"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":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"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":23,"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":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"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":47,"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":52,"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":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file From 1deefbd8cdb55b193f6fa306094c432cee7ee427 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 00:17:41 +0100 Subject: [PATCH 153/324] change maps to Collections --- src/client/Client.js | 19 ++-- src/structures/DMChannel.js | 3 +- src/structures/Guild.js | 19 ++-- src/structures/GuildChannel.js | 5 +- src/structures/Message.js | 17 +-- src/structures/TextChannel.js | 3 +- src/structures/VoiceChannel.js | 5 +- src/structures/interface/TextBasedChannel.js | 8 +- src/util/Collection.js | 109 +++++++++++++++++++ 9 files changed, 153 insertions(+), 35 deletions(-) create mode 100644 src/util/Collection.js diff --git a/src/client/Client.js b/src/client/Client.js index bb015efd6..dfbd5c37b 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -7,6 +7,7 @@ const ClientManager = require('./ClientManager'); const ClientDataResolver = require('./ClientDataResolver'); const WebSocketManager = require('./websocket/WebSocketManager'); const ActionsManager = require('./actions/ActionsManager'); +const Collection = require('../util/Collection'); /** * The starting point for making a Discord Bot. @@ -59,20 +60,20 @@ class Client extends EventEmitter { this.actions = new ActionsManager(this); /** - * A map of the Client's stored users - * @type {Map} + * A Collection of the Client's stored users + * @type {Collection} */ - this.users = new Map(); + this.users = new Collection(); /** - * A map of the Client's stored guilds - * @type {Map} + * A Collection of the Client's stored guilds + * @type {Collection} */ - this.guilds = new Map(); + this.guilds = new Collection(); /** - * A map of the Client's stored channels - * @type {Map} + * A Collection of the Client's stored channels + * @type {Collection} */ - this.channels = new Map(); + this.channels = new Collection(); /** * The authorization token for the logged in user/bot. * @type {?String} diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 00c9b8dfb..fca9c5e1d 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -1,6 +1,7 @@ const Channel = require('./Channel'); const TextBasedChannel = require('./interface/TextBasedChannel'); const User = require('./User'); +const Collection = require('../util/Collection'); /** * Represents a Direct Message Channel between two users. @@ -10,7 +11,7 @@ const User = require('./User'); class DMChannel extends Channel { constructor(client, data) { super(client, data); - this.messages = new Map(); + this.messages = new Collection(); } setup(data) { diff --git a/src/structures/Guild.js b/src/structures/Guild.js index d94a22ff8..a2279cf64 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -2,6 +2,7 @@ const User = require('./User'); const GuildMember = require('./GuildMember'); const Constants = require('../util/Constants'); const Role = require('./Role'); +const Collection = require('../util/Collection'); function arraysEqual(a, b) { if (a === b) return true; @@ -30,22 +31,22 @@ class Guild { this.client = client; /** - * A Map of members that are in this Guild. The key is the member's ID, the value is the member. - * @type {Map} + * A Collection of members that are in this Guild. The key is the member's ID, the value is the member. + * @type {Collection} */ - this.members = new Map(); + this.members = new Collection(); /** - * A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel. - * @type {Map} + * A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel. + * @type {Collection} */ - this.channels = new Map(); + this.channels = new Collection(); /** - * A Map of roles that are in this Guild. The key is the role's ID, the value is the role. - * @type {Map} + * A Collection of roles that are in this Guild. The key is the role's ID, the value is the role. + * @type {Collection} */ - this.roles = new Map(); + this.roles = new Collection(); if (!data) { return; diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 55c430e70..b8f6b196a 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -3,6 +3,7 @@ const PermissionOverwrites = require('./PermissionOverwrites'); const Role = require('./Role'); const EvaluatedPermissions = require('./EvaluatedPermissions'); const Constants = require('../util/Constants'); +const Collection = require('../util/Collection'); function arraysEqual(a, b) { if (a === b) return true; @@ -53,9 +54,9 @@ class GuildChannel extends Channel { this.ow = data.permission_overwrites; /** * A map of permission overwrites in this channel for roles and users. - * @type {Map} + * @type {Collection} */ - this.permissionOverwrites = new Map(); + this.permissionOverwrites = new Collection(); if (data.permission_overwrites) { for (const overwrite of data.permission_overwrites) { this.permissionOverwrites.set(overwrite.id, new PermissionOverwrites(this, overwrite)); diff --git a/src/structures/Message.js b/src/structures/Message.js index 07833f632..5faca1987 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -1,3 +1,4 @@ +const Collection = require('../util/Collection'); /** * Represents a Message on Discord */ @@ -79,16 +80,16 @@ class Message { */ this.attachments = data.attachments; /** - * An object containing a further users or roles map + * An object containing a further users, roles or channels collections * @type {Object} - * @property {Map} mentions.users Mentioned users, maps their ID to the user object. - * @property {Map} mentions.roles Mentioned roles, maps their ID to the role object. - * @property {Map} mentions.channels Mentioned channels, maps their ID to the channel object. + * @property {Collection} mentions.users Mentioned users, maps their ID to the user object. + * @property {Collection} mentions.roles Mentioned roles, maps their ID to the role object. + * @property {Collection} mentions.channels Mentioned channels, maps their ID to the channel object. */ this.mentions = { - users: new Map(), - roles: new Map(), - channels: new Map(), + users: new Collection(), + roles: new Collection(), + channels: new Collection(), }; /** * The ID of the message (unique in the channel it was sent) @@ -174,7 +175,7 @@ class Message { if (data.id) { this.id = data.id; } - if (this.channel.guild) { + if (this.channel.guild && data.content) { const channMentionsRaw = data.content.match(/<#([0-9]{14,20})>/g) || []; for (const raw of channMentionsRaw) { const chan = this.channel.guild.channels.get(raw.match(/([0-9]{14,20})/g)[0]); diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index d64fc7e89..f1d05415e 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -1,5 +1,6 @@ const GuildChannel = require('./GuildChannel'); const TextBasedChannel = require('./interface/TextBasedChannel'); +const Collection = require('../util/Collection'); /** * Represents a Server Text Channel on Discord. @@ -10,7 +11,7 @@ class TextChannel extends GuildChannel { constructor(guild, data) { super(guild, data); - this.messages = new Map(); + this.messages = new Collection(); } setup(data) { diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index eef063765..ebd60ef8a 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -1,4 +1,5 @@ const GuildChannel = require('./GuildChannel'); +const Collection = require('../util/Collection'); /** * Represents a Server Voice Channel on Discord. @@ -9,9 +10,9 @@ class VoiceChannel extends GuildChannel { super(guild, data); /** * The members in this Voice Channel. - * @type {Map} + * @type {Collection} */ - this.members = new Map(); + this.members = new Collection(); } setup(data) { diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index d96fd824c..3a03d6e85 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -1,3 +1,5 @@ +const Collection = require('../../util/Collection'); + /** * Interface for classes that have text-channel-like features * @interface @@ -6,10 +8,10 @@ class TextBasedChannel { constructor() { /** - * A Map containing the messages sent to this channel. - * @type {Map} + * A Collection containing the messages sent to this channel. + * @type {Collection} */ - this.messages = new Map(); + this.messages = new Collection(); } /** * Send a message to this channel diff --git a/src/util/Collection.js b/src/util/Collection.js new file mode 100644 index 000000000..66a7975dd --- /dev/null +++ b/src/util/Collection.js @@ -0,0 +1,109 @@ +/** + * A utility class to help make it easier to access the data stores + * @extends {Map} + */ +class Collection extends Map { + + /** + * Returns an ordered array of the values of this collection. + * @returns {Array} + * @example + * // identical to: + * Array.from(collection.values()); + */ + array() { + return Array.from(this.values()); + } + + /** + * Returns the first item in this collection. + * @returns {Object} + * @example + * // identical to: + * Array.from(collection.values())[0]; + */ + first() { + return this.array()[0]; + } + + /** + * Returns the last item in this collection. + * @returns {Object} + */ + last() { + const arr = this.array(); + return arr[arr.length - 1]; + } + + /** + * Returns a random item from this collection. + * @returns {Object} + */ + random() { + const arr = this.array(); + return arr[Math.floor(Math.random() * arr.length)]; + } + + /** + * The length (size) of this collection. + * @readonly + */ + get length() { + return this.size; + } + + /** + * Returns an array of items where `item[key] === value` of the collection + * @param {String} key the key to filter bby + * @param {any} value the expected value + * @returns {Array} + * @example + * collection.getAll('username', 'Bob'); + */ + findAll(key, value) { + const results = []; + for (const item of this.array()) { + if (item[key] === value) { + results.push(item); + } + } + return results; + } + + /** + * Returns a single item where `item[key] === value` + * @param {String} key the key to filter bby + * @param {any} value the expected value + * @returns {Object} + * @example + * collection.get('id', '123123...'); + */ + find(key, value) { + for (const item of this.array()) { + if (item[key] === value) { + return item; + } + } + return null; + } + + /** + * Returns true if the collection has an item where `item[key] === value` + * @param {String} key the key to filter bby + * @param {any} value the expected value + * @returns {Object} + * @example + * if (collection.exists('id', '123123...')) { + * console.log('user here!'); + * } + */ + exists(key, value) { + return Boolean(this.get(key, value)); + } + + _arrayMethod(method, args) { + return Array.prototype[method].apply(this.array(), args); + } +} + +module.exports = Collection; From 51a399d558565830a0d5d708184c6186b125a35e Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 00:18:38 +0100 Subject: [PATCH 154/324] fix docs --- docs/docs.json | 2 +- src/util/Collection.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index f96c20921..6e922e70e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471905450300},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":15,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":117,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A map of the Client's stored users","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]},"meta":{"line":65,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A map of the Client's stored guilds","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Guild",">"]]]},"meta":{"line":70,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A map of the Client's stored channels","memberof":"Client","type":{"types":[[["Map",".<"],["String",", "],["Channel",">"]]]},"meta":{"line":75,"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":80,"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":85,"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":90,"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":95,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":91,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"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":36,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":23,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":28,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":24,"file":"Guild.js","path":"src/structures"},"methods":[{"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":117,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":131,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":143,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":328,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":341,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":30,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Map of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":36,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Map of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]},"meta":{"line":42,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Map of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]},"meta":{"line":48,"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":59,"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":64,"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":195,"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":200,"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":205,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":210,"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":215,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":220,"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":225,"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":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":235,"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":240,"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":245,"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":250,"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":255,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":282,"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":26,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":72,"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#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":104,"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.log);"],"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":236,"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.log);"],"meta":{"line":250,"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.log);"],"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"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":47,"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":52,"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":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":4,"file":"Message.js","path":"src/structures"},"methods":[{"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":194,"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#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.log);"],"meta":{"line":228,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":242,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":10,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":17,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":24,"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":35,"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":40,"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#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":50,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":60,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":65,"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#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users or roles map","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Map",".<"],["String",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Map",".<"],["String",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels, maps their ID to the channel object.","type":{"types":[[["Map",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":97,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":9,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"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":47,"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":52,"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":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":7,"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.log);"],"meta":{"line":41,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":72,"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#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":104,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":184,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":236,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":250,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":264,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":278,"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":[[["Map",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":14,"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":23,"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":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":42,"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":47,"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":52,"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":[[["Map",".<"],["String",", "],["PermissionOverwrites",">"]]]},"meta":{"line":58,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":5,"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.log);"],"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":38,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Map containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]]]},"meta":{"line":12,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":160,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471907922983},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":195,"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#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.log);"],"meta":{"line":229,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":243,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":89,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":98,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file diff --git a/src/util/Collection.js b/src/util/Collection.js index 66a7975dd..38d3a6b47 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -47,6 +47,7 @@ class Collection extends Map { /** * The length (size) of this collection. * @readonly + * @type {Number} */ get length() { return this.size; From 50dcececfb7af994abdd0861e30a5da2dada9263 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 00:34:42 +0100 Subject: [PATCH 155/324] Create example docs --- docs/custom/examples/ping_pong.js | 30 ++++++++++++++++++++++++++++++ docs/custom/index.js | 1 + docs/custom/ping_pong.js | 10 ++++++++++ docs/docs.json | 2 +- src/structures/Message.js | 3 ++- 5 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 docs/custom/examples/ping_pong.js create mode 100644 docs/custom/ping_pong.js diff --git a/docs/custom/examples/ping_pong.js b/docs/custom/examples/ping_pong.js new file mode 100644 index 000000000..4cede6a80 --- /dev/null +++ b/docs/custom/examples/ping_pong.js @@ -0,0 +1,30 @@ +/* + A ping pong bot, whenever you send "ping", it replies "pong". +*/ + +// import the discord.js module +const Discord = require('discord.js'); + +// create an instance of a Discord Client, and call it bot +const bot = new Discord.Client(); + +// the token of your bot - https://discordapp.com/developers/applications/me +const token = 'your bot token here'; + +// the ready event is vital, it means that your bot will only start reacting to information +// from Discord _after_ ready is emitted. +bot.on('ready', () => { + console.log('I am ready!'); +}); + +// create an event listener for messages +bot.on('message', message => { + // if the message is "ping", + if (message.content === 'ping') { + // send "pong" to the same channel. + message.channel.sendMessage('pong'); + } +}); + +// log our bot in +bot.login(token); diff --git a/docs/custom/index.js b/docs/custom/index.js index 701c76656..fbffd6d8d 100644 --- a/docs/custom/index.js +++ b/docs/custom/index.js @@ -1,5 +1,6 @@ const files = [ require('./getting_started'), + require('./ping_pong'), ]; const categories = {}; diff --git a/docs/custom/ping_pong.js b/docs/custom/ping_pong.js new file mode 100644 index 000000000..46a341b4d --- /dev/null +++ b/docs/custom/ping_pong.js @@ -0,0 +1,10 @@ +const fs = require('fs-extra'); + +module.exports = { + category: 'Examples', + name: 'Ping Pong', + data: +`\`\`\`js +${fs.readFileSync('./docs/custom/examples/ping_pong.js').toString('utf-8')} +\`\`\``, +}; diff --git a/docs/docs.json b/docs/docs.json index 6e922e70e..30dc64f46 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471907922983},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":195,"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#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.log);"],"meta":{"line":229,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":243,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":89,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":98,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\n"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471908886515},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/Message.js b/src/structures/Message.js index 5faca1987..ed8e2c960 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -84,7 +84,8 @@ class Message { * @type {Object} * @property {Collection} mentions.users Mentioned users, maps their ID to the user object. * @property {Collection} mentions.roles Mentioned roles, maps their ID to the role object. - * @property {Collection} mentions.channels Mentioned channels, maps their ID to the channel object. + * @property {Collection} + * mentions.channels Mentioned channels, maps their ID to the channel object. */ this.mentions = { users: new Collection(), From 3a16f5147db22a98d8f9488b282950165223deac Mon Sep 17 00:00:00 2001 From: Hyper-Coder Date: Mon, 22 Aug 2016 21:12:46 -0400 Subject: [PATCH 156/324] Added message.reply (#529) --- src/structures/Message.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/structures/Message.js b/src/structures/Message.js index ed8e2c960..7a02711a0 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -244,6 +244,21 @@ class Message { edit(content) { return this.client.rest.methods.updateMessage(this, content); } + + /** + * Reply to a message + * @param {String} content the content of the message + * @param {MessageOptions} [options = {}] the options to provide + * @returns {Promise} + * @example + * // reply to a message + * message.reply('Hey, I'm a reply!') + * .then(msg => console.log(`Sent a reply to ${msg.author}`)) + * .catch(console.log); + */ + reply(content, options = {}) { + return this.client.rest.methods.sendMessage(this.channel, this.guild ? `${this.author}, ${content}` : content, options.tts); + } } module.exports = Message; From d710713c0923cabebeb8ed1570fb364aa242f1a3 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 13:27:18 +0100 Subject: [PATCH 157/324] Add GroupDMChannel support --- docs/docs.json | 2 +- src/client/ClientDataManager.js | 3 + src/structures/GroupDMChannel.js | 133 +++++++++++++++++++++++++++++++ src/structures/Message.js | 5 +- 4 files changed, 140 insertions(+), 3 deletions(-) create mode 100644 src/structures/GroupDMChannel.js diff --git a/docs/docs.json b/docs/docs.json index 30dc64f46..11b755c6a 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471908886515},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":24,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471955245530},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/ClientDataManager.js b/src/client/ClientDataManager.js index 96f1fa427..b10332c72 100644 --- a/src/client/ClientDataManager.js +++ b/src/client/ClientDataManager.js @@ -6,6 +6,7 @@ const DMChannel = require('../structures/DMChannel'); const TextChannel = require('../structures/TextChannel'); const VoiceChannel = require('../structures/VoiceChannel'); const GuildChannel = require('../structures/GuildChannel'); +const GroupDMChannel = require('../structures/GroupDMChannel'); class ClientDataManager { constructor(client) { @@ -48,6 +49,8 @@ class ClientDataManager { let channel; if (data.type === Constants.ChannelTypes.DM) { channel = new DMChannel(this.client, data); + } else if (data.type === Constants.ChannelTypes.groupDM) { + channel = new GroupDMChannel(this.client, data); } else { guild = guild || this.client.guilds.get(data.guild_id); if (guild) { diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js new file mode 100644 index 000000000..58e7340f0 --- /dev/null +++ b/src/structures/GroupDMChannel.js @@ -0,0 +1,133 @@ +const Channel = require('./Channel'); +const TextBasedChannel = require('./interface/TextBasedChannel'); +const Collection = require('../util/Collection'); + +/* +{ type: 3, + recipients: + [ { username: 'Charlie', + id: '123', + discriminator: '6631', + avatar: '123' }, + { username: 'Ben', + id: '123', + discriminator: '2055', + avatar: '123' }, + { username: 'Adam', + id: '123', + discriminator: '2406', + avatar: '123' } ], + owner_id: '123', + name: null, + last_message_id: '123', + id: '123', + icon: null } +*/ + + +function arraysEqual(a, b) { + if (a === b) return true; + if (a.length !== b.length) return false; + + for (const itemInd in a) { + const item = a[itemInd]; + const ind = b.indexOf(item); + if (ind) { + b.splice(ind, 1); + } + } + + return b.length === 0; +} + +/** + * Represents a Group DM on Discord + * @extends {Channel} + * @implements {TextBasedChannel} + */ +class GroupDMChannel extends Channel { + + constructor(client, data) { + super(client, data); + + this.messages = new Collection(); + } + + equals(other) { + const base = ( + this.id === other.id && + this.name === other.name && + this.icon === other.icon && + this.owner.id === other.owner_id + ); + + if (base) { + const thisIDs = this.recipients.array().map(r => r.id); + const otherIDs = other.recipients.map(r => r.id); + return arraysEqual(thisIDs, otherIDs); + } + + return base; + } + + setup(data) { + super.setup(data); + + if (!this.recipients) { + /** + * A collection of the recipients of this DM, mapped by their ID. + * @type {Collection} + */ + this.recipients = new Collection(); + } + + if (data.recipients) { + for (const recipient of data.recipients) { + const user = this.client.dataManager.newUser(recipient); + this.recipients.set(user.id, user); + } + } + /** + * The name of this Group DM, can be null if one isn't set. + * @type {String} + */ + this.name = data.name; + /** + * The ID of this Group DM Channel. + * @type {String} + */ + this.id = data.id; + /** + * A hash of the Group DM icon. + * @type {String} + */ + this.icon = data.icon; + /** + * The ID of the last message in the channel, if one was sent. + * @type {?String} + */ + this.lastMessageID = data.last_message_id; + /** + * The owner of this Group DM. + * @type {User} + */ + this.owner = this.client.users.get(data.owner_id); + } + + sendMessage() { + return; + } + + sendTTSMessage() { + return; + } + + _cacheMessage() { + return; + } + +} + +TextBasedChannel.applyToClass(GroupDMChannel, true); + +module.exports = GroupDMChannel; diff --git a/src/structures/Message.js b/src/structures/Message.js index 7a02711a0..d35909dba 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -249,7 +249,7 @@ class Message { * Reply to a message * @param {String} content the content of the message * @param {MessageOptions} [options = {}] the options to provide - * @returns {Promise} + * @returns {Promise} * @example * // reply to a message * message.reply('Hey, I'm a reply!') @@ -257,7 +257,8 @@ class Message { * .catch(console.log); */ reply(content, options = {}) { - return this.client.rest.methods.sendMessage(this.channel, this.guild ? `${this.author}, ${content}` : content, options.tts); + const newContent = this.guild ? `${this.author}, ${content}` : content; + return this.client.rest.methods.sendMessage(this.channel, newContent, options.tts); } } From 576a7f24889b7d891c823803cdc965effa688cdc Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 13:51:56 +0100 Subject: [PATCH 158/324] Add TextBasedChannel{full}.getMessages() --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 25 +++++++++++ src/structures/DMChannel.js | 4 ++ src/structures/GroupDMChannel.js | 3 ++ src/structures/TextChannel.js | 4 ++ src/structures/interface/TextBasedChannel.js | 44 +++++++++++++++++++- 6 files changed, 80 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 11b755c6a..aa4a3e433 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471955245530},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471956720997},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 7dc22e105..a28541801 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -292,6 +292,31 @@ class RESTMethods { }); } + getChannelMessages(channel, payload = {}) { + return new Promise((resolve, reject) => { + const params = []; + if (payload.limit) { + params.push(`limit=${payload.limit}`); + } + if (payload.around) { + params.push(`around=${payload.around}`); + } else if (payload.before) { + params.push(`before=${payload.before}`); + } else if (payload.after) { + params.push(`after=${payload.after}`); + } + + let request = Constants.Endpoints.channelMessages(channel.id); + if (params.length > 0) { + request += `?${params.join('&')}`; + } + + this.rest.makeRequest('get', request, true) + .then(resolve) + .catch(reject); + }); + } + updateGuildRole(role, _data) { return new Promise((resolve, reject) => { /* diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index fca9c5e1d..6d6b2a2c5 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -49,6 +49,10 @@ class DMChannel extends Channel { _cacheMessage() { return; } + + getMessages() { + return; + } } TextBasedChannel.applyToClass(DMChannel, true); diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index 58e7340f0..a46c23f72 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -126,6 +126,9 @@ class GroupDMChannel extends Channel { return; } + getMessages() { + return; + } } TextBasedChannel.applyToClass(GroupDMChannel, true); diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index f1d05415e..b7ce043f4 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -34,6 +34,10 @@ class TextChannel extends GuildChannel { _cacheMessage() { return; } + + getMessages() { + return; + } } TextBasedChannel.applyToClass(TextChannel, true); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 3a03d6e85..daf792cec 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -41,6 +41,44 @@ class TextBasedChannel { return this.client.rest.methods.sendMessage(this, content, true); } + /** + * The parameters to pass in when requesting previous messages from a channel. `around`, `before` and + * `after` are mutually exclusive. All the parameters are optional. + * ```js + * { + * limit: 30, // the message limit, defaults to 50 + * before: '123', // gets messages before the given message ID + * after: '123', // gets messages after the given message ID + * around: '123', // gets messages around the given message ID + * } + * ``` + * @typedef {Object} ChannelLogsQueryOptions + */ + + /** + * Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects. + * @param {ChannelLogsQueryOptions} [options={}] the query parameters to pass in + * @returns {Promise, Error>} + * @example + * // get messages + * channel.getMessages({limit: 10}) + * .then(messages => console.log(`Received ${messages.size} messages`)) + * .catch(console.log); + */ + getMessages(options = {}) { + return new Promise((resolve, reject) => { + this.client.rest.methods.getChannelMessages(this, options) + .then(data => { + const messages = new Collection(); + for (const message of data) { + messages.set(message.id, message); + } + resolve(messages); + }) + .catch(reject); + }); + } + _cacheMessage(message) { const maxSize = this.client.options.max_message_cache; if (maxSize === 0) { @@ -63,7 +101,11 @@ function applyProp(structure, prop) { } exports.applyToClass = (structure, full = false) => { - const props = full ? ['sendMessage', 'sendTTSMessage', '_cacheMessage'] : ['sendMessage', 'sendTTSMessage']; + const props = ['sendMessage', 'sendTTSMessage']; + if (full) { + props.push('_cacheMessage'); + props.push('getMessages'); + } for (const prop of props) { applyProp(structure, prop); } From 0916cd71a58fa81f839d3bd3f5e195bbaa06fa79 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 14:06:06 +0100 Subject: [PATCH 159/324] Change test script to ESLint --- docs/docs.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index aa4a3e433..879e7ca9d 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471956720997},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471957570217},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/package.json b/package.json index 397d9f313..68e89f69a 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "A way to interface with the Discord API", "main": "./src/index", "scripts": { - "test": "eslint src/ && node test/random", + "test": "eslint src/", "docs": "node docs/generator/generator.js" }, "repository": { From ebfe3e2e62774ccc2959118b60445c261a4d9857 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 14:16:59 +0100 Subject: [PATCH 160/324] Add travis yml --- .travis.yml | 5 +++++ docs/docs.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..1e2a98d34 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "6" +before_install: npm install -g eslint +install: npm install \ No newline at end of file diff --git a/docs/docs.json b/docs/docs.json index 879e7ca9d..d9276a37a 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471957570217},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471958223127},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file From 1ff7bce01d1ddc21c775a63d8542ac29035b8c77 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 14:24:06 +0100 Subject: [PATCH 161/324] Fix travis build script --- .travis.yml | 2 +- docs/docs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1e2a98d34..d05c2dd57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: node_js node_js: - "6" -before_install: npm install -g eslint +before_install: npm install -g eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react install: npm install \ No newline at end of file diff --git a/docs/docs.json b/docs/docs.json index d9276a37a..74e806420 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471958223127},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471958650273},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file From 2ed4ff7a55df11bd892d19bf3ee46e2433fd55dc Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 14:25:11 +0100 Subject: [PATCH 162/324] Add caching to travis build script --- .travis.yml | 3 +++ docs/docs.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d05c2dd57..d88f78fa5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,8 @@ language: node_js node_js: - "6" +cache: + directories: + - node_modules before_install: npm install -g eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react install: npm install \ No newline at end of file diff --git a/docs/docs.json b/docs/docs.json index 74e806420..bf8bac56f 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471958650273},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471958715263},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file From 84a4755f53e553f1687b55a8b83955c1bb42d267 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 14:44:18 +0100 Subject: [PATCH 163/324] Fix typo in docs --- docs/docs.json | 2 +- src/util/Collection.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index bf8bac56f..5f0f23eda 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471958715263},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter bby","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471959862394},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/util/Collection.js b/src/util/Collection.js index 38d3a6b47..a281f687d 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -55,7 +55,7 @@ class Collection extends Map { /** * Returns an array of items where `item[key] === value` of the collection - * @param {String} key the key to filter bby + * @param {String} key the key to filter by * @param {any} value the expected value * @returns {Array} * @example @@ -73,7 +73,7 @@ class Collection extends Map { /** * Returns a single item where `item[key] === value` - * @param {String} key the key to filter bby + * @param {String} key the key to filter by * @param {any} value the expected value * @returns {Object} * @example @@ -90,7 +90,7 @@ class Collection extends Map { /** * Returns true if the collection has an item where `item[key] === value` - * @param {String} key the key to filter bby + * @param {String} key the key to filter by * @param {any} value the expected value * @returns {Object} * @example From c8be80abd764e403090e6b2696e860a4b33d663b Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 15:08:59 +0100 Subject: [PATCH 164/324] Add support to recognise 4004 codes and throw an error --- docs/docs.json | 2 +- src/client/websocket/WebSocketManager.js | 7 +++++-- src/util/Constants.js | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 5f0f23eda..91a88ab54 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471959862394},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":184,"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":203,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471961343739},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":187,"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":206,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 7295f7b0d..e1d19f178 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -59,7 +59,7 @@ class WebSocketManager { */ this.ws = new WebSocket(gateway); this.ws.onopen = () => this.eventOpen(); - this.ws.onclose = () => this.eventClose(); + this.ws.onclose = (d) => this.eventClose(d); this.ws.onmessage = (e) => this.eventMessage(e); this.ws.onerror = (e) => this.eventError(e); } @@ -126,7 +126,10 @@ class WebSocketManager { * Run whenever the connection to the gateway is closed, it will try to reconnect the client. * @returns {null} */ - eventClose() { + eventClose(event) { + if (event.code === 4004) { + throw Constants.Errors.BAD_LOGIN; + } if (!this.reconnecting) { this.tryReconnect(); } diff --git a/src/util/Constants.js b/src/util/Constants.js index bc3cceff5..bcece3a5e 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -66,6 +66,7 @@ exports.Errors = { TOOK_TOO_LONG: new Error('something took too long to do'), NOT_A_PERMISSION: new Error('that is not a valid permission number'), INVALID_RATE_LIMIT_METHOD: new Error('unknown rate limiting method'), + BAD_LOGIN: new Error('incorrect login details were provided'), }; const API = 'https://discordapp.com/api'; From f38aff7523c0933df1054c074e05658fe8d73a24 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 15:48:59 +0100 Subject: [PATCH 165/324] start work on voice manager --- docs/docs.json | 2 +- src/client/Client.js | 8 +++++++- src/client/ClientVoiceManager.js | 29 +++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 src/client/ClientVoiceManager.js diff --git a/docs/docs.json b/docs/docs.json index 91a88ab54..313c2c435 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471961343739},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":187,"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":206,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471963744009},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":187,"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":206,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index dfbd5c37b..6a057cb66 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -5,6 +5,7 @@ const RESTManager = require('./rest/RESTManager'); const ClientDataManager = require('./ClientDataManager'); const ClientManager = require('./ClientManager'); const ClientDataResolver = require('./ClientDataResolver'); +const ClientVoiceManager = require('./ClientVoiceManager'); const WebSocketManager = require('./websocket/WebSocketManager'); const ActionsManager = require('./actions/ActionsManager'); const Collection = require('../util/Collection'); @@ -58,7 +59,12 @@ class Client extends EventEmitter { * @private */ this.actions = new ActionsManager(this); - + /** + * The Voice Manager of the Client + * @type {ClientVoiceManager} + * @private + */ + this.voice = new ClientVoiceManager(this); /** * A Collection of the Client's stored users * @type {Collection} diff --git a/src/client/ClientVoiceManager.js b/src/client/ClientVoiceManager.js new file mode 100644 index 000000000..bbd0da27c --- /dev/null +++ b/src/client/ClientVoiceManager.js @@ -0,0 +1,29 @@ +const Collection = require('../util/Collection'); + +/** + * Manages all the voice stuff for the Client + * @private + */ +class ClientVoiceManager { + constructor(client) { + /** + * The client that instantiated this voice manager + */ + this.client = client; + /** + * A collection mapping connection IDs to the Connection objects + */ + this.connections = new Collection(); + } + + /** + * Sets up a request to join a voice channel + * @param {VoiceChannel} channel the voice channel to join + * @returns {null} + */ + joinChannel(channel) { + return channel; + } +} + +module.exports = ClientVoiceManager; From 0edf8384747e6e5da81122c163acdc4f2afd7aff Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 16:59:34 +0100 Subject: [PATCH 166/324] more voice stuff --- docs/docs.json | 2 +- src/client/ClientVoiceManager.js | 22 +++++++++++++++++++++- src/client/websocket/WebSocketManager.js | 3 +++ src/structures/VoiceChannel.js | 4 ++++ 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 313c2c435..b9eab011c 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471963744009},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":187,"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":206,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471967978084},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":190,"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":209,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/ClientVoiceManager.js b/src/client/ClientVoiceManager.js index bbd0da27c..9144d1296 100644 --- a/src/client/ClientVoiceManager.js +++ b/src/client/ClientVoiceManager.js @@ -1,4 +1,6 @@ const Collection = require('../util/Collection'); +const mergeDefault = require('../util/MergeDefault'); +const Constants = require('../util/Constants'); /** * Manages all the voice stuff for the Client @@ -16,13 +18,31 @@ class ClientVoiceManager { this.connections = new Collection(); } + /** + * Sends a request to the main gateway to join a voice channel + * @param {VoiceChannel} channel the channel to join + * @param {Object} [options] the options to provide + */ + _sendWSJoin(channel, options = {}) { + options = mergeDefault({ + guild_id: channel.guild.id, + channel_id: channel.id, + self_mute: false, + self_deaf: false, + }, options); + this.client.ws.send({ + op: Constants.OPCodes.VOICE_STATE_UPDATE, + d: options, + }); + } + /** * Sets up a request to join a voice channel * @param {VoiceChannel} channel the voice channel to join * @returns {null} */ joinChannel(channel) { - return channel; + this._sendWSJoin(channel); } } diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index e1d19f178..1a9a1d59d 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -127,6 +127,7 @@ class WebSocketManager { * @returns {null} */ eventClose(event) { + console.log('close', event.code); if (event.code === 4004) { throw Constants.Errors.BAD_LOGIN; } @@ -154,6 +155,8 @@ class WebSocketManager { return this.eventError(Constants.Errors.BAD_WS_MESSAGE); } + this.client.emit('raw', packet); + if (packet.op === 10) { this.client.manager.setupKeepAlive(packet.d.heartbeat_interval); } diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index ebd60ef8a..9439da447 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -42,6 +42,10 @@ class VoiceChannel extends GuildChannel { setBitrate(bitrate) { return this.rest.client.rest.methods.updateChannel(this, { bitrate }); } + + join() { + return this.client.voice.joinChannel(this); + } } module.exports = VoiceChannel; From b065bf799cc7db2bd2693566952840e77f5345cc Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 17:03:44 +0100 Subject: [PATCH 167/324] Fix getMessages bug --- docs/docs.json | 2 +- src/structures/interface/TextBasedChannel.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 91a88ab54..0e42690bf 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471961343739},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":187,"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":206,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":14,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":14,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":14,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":7,"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.log);"],"meta":{"line":27,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":40,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":14,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471968228981},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":187,"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":206,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index daf792cec..eac890b82 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -1,4 +1,5 @@ const Collection = require('../../util/Collection'); +const Message = require('../Message'); /** * Interface for classes that have text-channel-like features @@ -71,7 +72,7 @@ class TextBasedChannel { .then(data => { const messages = new Collection(); for (const message of data) { - messages.set(message.id, message); + messages.set(message.id, new Message(this, message, this.client)); } resolve(messages); }) From d029227a8e65746b5734e2b61ae9830066cbcdb6 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 17:08:00 +0100 Subject: [PATCH 168/324] rebuild docs --- docs/docs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 0e42690bf..cb1e89c55 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471968228981},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":187,"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":206,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471968484619},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":16,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":118,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":66,"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":71,"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":76,"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":81,"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":86,"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":91,"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":96,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":187,"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":206,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file From fa085c18cdc2d1b2d2cd46fce82b6fe8599f41e6 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 17:52:36 +0100 Subject: [PATCH 169/324] Handle Voice Server Update events --- docs/docs.json | 2 +- src/client/ClientVoiceManager.js | 17 +++++++++++++ .../packets/WebSocketPacketManager.js | 1 + .../packets/handlers/VoiceServerUpdate.js | 24 +++++++++++++++++++ src/util/Constants.js | 1 + 5 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 src/client/websocket/packets/handlers/VoiceServerUpdate.js diff --git a/docs/docs.json b/docs/docs.json index 0530e1b42..c79f47eb5 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471968757055},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":190,"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":209,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471971159967},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":190,"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":209,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/ClientVoiceManager.js b/src/client/ClientVoiceManager.js index 9144d1296..e6b3369ad 100644 --- a/src/client/ClientVoiceManager.js +++ b/src/client/ClientVoiceManager.js @@ -10,12 +10,28 @@ class ClientVoiceManager { constructor(client) { /** * The client that instantiated this voice manager + * @type {Client} */ this.client = client; /** * A collection mapping connection IDs to the Connection objects + * @type {Collection} */ this.connections = new Collection(); + /** + * Pending connection attempts, maps Guild ID to VoiceChannel + * @type {Collection} + */ + this.pending = new Collection(); + } + + /** + * Called when the Client receives information about this voice state update. + * @param {String} token the token to authorise with + * @param {String} endpoint the endpoint to connect to + */ + _receivedVoiceServer(token, endpoint) { + console.log('got', token, endpoint); } /** @@ -42,6 +58,7 @@ class ClientVoiceManager { * @returns {null} */ joinChannel(channel) { + this.pending.set(channel.guild.id, channel); this._sendWSJoin(channel); } } diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 7511c1be4..31a7bf46b 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -36,6 +36,7 @@ class WebSocketPacketManager { this.register(Constants.WSEvents.MESSAGE_CREATE, 'MessageCreate'); this.register(Constants.WSEvents.MESSAGE_DELETE, 'MessageDelete'); this.register(Constants.WSEvents.MESSAGE_UPDATE, 'MessageUpdate'); + this.register(Constants.WSEvents.VOICE_SERVER_UPDATE, 'VoiceServerUpdate'); } get client() { diff --git a/src/client/websocket/packets/handlers/VoiceServerUpdate.js b/src/client/websocket/packets/handlers/VoiceServerUpdate.js new file mode 100644 index 000000000..faac1dc5e --- /dev/null +++ b/src/client/websocket/packets/handlers/VoiceServerUpdate.js @@ -0,0 +1,24 @@ +const AbstractHandler = require('./AbstractHandler'); + +/* +{ + "token": "my_token", + "guild_id": "41771983423143937", + "endpoint": "smart.loyal.discord.gg" +} +*/ + +class VoiceServerUpdate extends AbstractHandler { + + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; + + if (client.voice.pending.get(data.guild_id)) { + client.voice._receivedVoiceServer(data.token, data.endpoint); + } + } + +} + +module.exports = VoiceServerUpdate; diff --git a/src/util/Constants.js b/src/util/Constants.js index bcece3a5e..a24755c45 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -178,6 +178,7 @@ exports.WSEvents = { VOICE_STATE_UPDATE: 'VOICE_STATE_UPDATE', FRIEND_ADD: 'RELATIONSHIP_ADD', FRIEND_REMOVE: 'RELATIONSHIP_REMOVE', + VOICE_SERVER_UPDATE: 'VOICE_SERVER_UPDATE', }; const PermissionFlags = exports.PermissionFlags = { From d8b1ef47cdd248109b7cff34e4a96177702cbba2 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 18:29:48 +0100 Subject: [PATCH 170/324] voice setup waits for all data --- docs/docs.json | 2 +- src/client/Client.js | 2 +- src/client/{ => voice}/ClientVoiceManager.js | 50 ++++++++++++++++--- .../packets/handlers/VoiceServerUpdate.js | 4 +- .../packets/handlers/VoiceStateUpdate.js | 4 ++ 5 files changed, 51 insertions(+), 11 deletions(-) rename src/client/{ => voice}/ClientVoiceManager.js (51%) diff --git a/docs/docs.json b/docs/docs.json index c79f47eb5..397eb820a 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471971159967},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":34,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":190,"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":209,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471973393159},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":38,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":190,"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":209,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 6a057cb66..6ef12b3a8 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -5,7 +5,7 @@ const RESTManager = require('./rest/RESTManager'); const ClientDataManager = require('./ClientDataManager'); const ClientManager = require('./ClientManager'); const ClientDataResolver = require('./ClientDataResolver'); -const ClientVoiceManager = require('./ClientVoiceManager'); +const ClientVoiceManager = require('./voice/ClientVoiceManager'); const WebSocketManager = require('./websocket/WebSocketManager'); const ActionsManager = require('./actions/ActionsManager'); const Collection = require('../util/Collection'); diff --git a/src/client/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js similarity index 51% rename from src/client/ClientVoiceManager.js rename to src/client/voice/ClientVoiceManager.js index e6b3369ad..bda98f419 100644 --- a/src/client/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -1,6 +1,6 @@ -const Collection = require('../util/Collection'); -const mergeDefault = require('../util/MergeDefault'); -const Constants = require('../util/Constants'); +const Collection = require('../../util/Collection'); +const mergeDefault = require('../../util/MergeDefault'); +const Constants = require('../../util/Constants'); /** * Manages all the voice stuff for the Client @@ -25,13 +25,44 @@ class ClientVoiceManager { this.pending = new Collection(); } + _checkPendingReady(guildID) { + const pendingRequest = this.pending.get(guildID); + if (!pendingRequest) { + throw new Error('Guild not pending'); + } + if (pendingRequest.token && pendingRequest.sessionID && pendingRequest.endpoint) { + console.log('got all info for', guildID); + } + } + /** - * Called when the Client receives information about this voice state update. + * Called when the Client receives information about this voice server update. + * @param {String} guildID the ID of the Guild * @param {String} token the token to authorise with * @param {String} endpoint the endpoint to connect to */ - _receivedVoiceServer(token, endpoint) { - console.log('got', token, endpoint); + _receivedVoiceServer(guildID, token, endpoint) { + const pendingRequest = this.pending.get(guildID); + if (!pendingRequest) { + throw new Error('Guild not pending'); + } + pendingRequest.token = token; + pendingRequest.endpoint = endpoint; + this._checkPendingReady(guildID); + } + + /** + * Called when the Client receives information about the voice state update. + * @param {String} guildID the ID of the Guild + * @param {String} sessionID the session id to authorise with + */ + _receivedVoiceStateUpdate(guildID, sessionID) { + const pendingRequest = this.pending.get(guildID); + if (!pendingRequest) { + throw new Error('Guild not pending'); + } + pendingRequest.sessionID = sessionID; + this._checkPendingReady(guildID); } /** @@ -58,7 +89,12 @@ class ClientVoiceManager { * @returns {null} */ joinChannel(channel) { - this.pending.set(channel.guild.id, channel); + this.pending.set(channel.guild.id, { + channel, + sessionID: null, + token: null, + endpoint: null, + }); this._sendWSJoin(channel); } } diff --git a/src/client/websocket/packets/handlers/VoiceServerUpdate.js b/src/client/websocket/packets/handlers/VoiceServerUpdate.js index faac1dc5e..4af1b7e4a 100644 --- a/src/client/websocket/packets/handlers/VoiceServerUpdate.js +++ b/src/client/websocket/packets/handlers/VoiceServerUpdate.js @@ -14,8 +14,8 @@ class VoiceServerUpdate extends AbstractHandler { const data = packet.d; const client = this.packetManager.client; - if (client.voice.pending.get(data.guild_id)) { - client.voice._receivedVoiceServer(data.token, data.endpoint); + if (client.voice.pending.has(data.guild_id)) { + client.voice._receivedVoiceServer(data.guild_id, data.token, data.endpoint); } } diff --git a/src/client/websocket/packets/handlers/VoiceStateUpdate.js b/src/client/websocket/packets/handlers/VoiceStateUpdate.js index 1d89a6886..01d38242c 100644 --- a/src/client/websocket/packets/handlers/VoiceStateUpdate.js +++ b/src/client/websocket/packets/handlers/VoiceStateUpdate.js @@ -18,6 +18,10 @@ class VoiceStateUpdateHandler extends AbstractHandler { member.voiceChannel.members.delete(oldVoiceChannelMember.id); } + if (client.voice.pending.has(guild.id)) { + client.voice._receivedVoiceStateUpdate(data.guild_id, data.session_id); + } + member.serverMute = data.mute; member.serverDeaf = data.deaf; member.selfMute = data.self_mute; From f713f528416de1ac8c1193b0d54d846543727c30 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 19:13:09 +0100 Subject: [PATCH 171/324] Add voice websocket handling --- docs/docs.json | 2 +- src/client/voice/ClientVoiceManager.js | 8 ++- src/client/voice/VoiceConnection.js | 19 +++++++ src/client/voice/VoiceConnectionUDPClient.js | 5 ++ src/client/voice/VoiceConnectionWebSocket.js | 57 ++++++++++++++++++++ 5 files changed, 88 insertions(+), 3 deletions(-) create mode 100644 src/client/voice/VoiceConnection.js create mode 100644 src/client/voice/VoiceConnectionUDPClient.js create mode 100644 src/client/voice/VoiceConnectionWebSocket.js diff --git a/docs/docs.json b/docs/docs.json index 397eb820a..9a7eb110e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471973393159},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":38,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":190,"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":209,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471976003172},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":38,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":190,"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":209,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index bda98f419..3972158f3 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -1,6 +1,7 @@ const Collection = require('../../util/Collection'); const mergeDefault = require('../../util/MergeDefault'); const Constants = require('../../util/Constants'); +const VoiceConnection = require('./VoiceConnection'); /** * Manages all the voice stuff for the Client @@ -31,7 +32,9 @@ class ClientVoiceManager { throw new Error('Guild not pending'); } if (pendingRequest.token && pendingRequest.sessionID && pendingRequest.endpoint) { - console.log('got all info for', guildID); + const { token, sessionID, endpoint } = pendingRequest; + const voiceConnection = new VoiceConnection(this, guildID, token, sessionID, endpoint); + this.connections.set(guildID, voiceConnection); } } @@ -47,7 +50,8 @@ class ClientVoiceManager { throw new Error('Guild not pending'); } pendingRequest.token = token; - pendingRequest.endpoint = endpoint; + // remove the port otherwise it errors ¯\_(ツ)_/¯ + pendingRequest.endpoint = endpoint.match(/([^:]*)/)[0]; this._checkPendingReady(guildID); } diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js new file mode 100644 index 000000000..5fd965bbf --- /dev/null +++ b/src/client/voice/VoiceConnection.js @@ -0,0 +1,19 @@ +const VoiceConnectionWebSocket = require('./VoiceConnectionWebSocket'); +const EventEmitter = require('events').EventEmitter; + +class VoiceConnection extends EventEmitter { + constructor(manager, serverID, token, sessionID, endpoint) { + super(); + this.manager = manager; + this.websocket = new VoiceConnectionWebSocket(this, serverID, token, sessionID, endpoint); + this.bindListeners(); + } + + bindListeners() { + this.websocket.on('ready-for-udp', data => { + console.log(data); + }); + } +} + +module.exports = VoiceConnection; diff --git a/src/client/voice/VoiceConnectionUDPClient.js b/src/client/voice/VoiceConnectionUDPClient.js new file mode 100644 index 000000000..537796267 --- /dev/null +++ b/src/client/voice/VoiceConnectionUDPClient.js @@ -0,0 +1,5 @@ +class VoiceConnectionUDPClient { + +} + +module.exports = VoiceConnectionUDPClient; diff --git a/src/client/voice/VoiceConnectionWebSocket.js b/src/client/voice/VoiceConnectionWebSocket.js new file mode 100644 index 000000000..8930a1f83 --- /dev/null +++ b/src/client/voice/VoiceConnectionWebSocket.js @@ -0,0 +1,57 @@ +const WebSocket = require('ws'); +const Constants = require('../../util/Constants'); +const EventEmitter = require('events').EventEmitter; + +class VoiceConnectionWebSocket extends EventEmitter { + constructor(voiceConnection, serverID, token, sessionID, endpoint) { + super(); + this.voiceConnection = voiceConnection; + this.token = token; + this.sessionID = sessionID; + this.serverID = serverID; + this.ws = new WebSocket(`wss://${endpoint}`, null, { rejectUnauthorized: false }); + this.ws.onopen = () => this._onOpen(); + this.ws.onmessage = e => this._onMessage(e); + } + + send(data) { + if (this.ws.readyState === WebSocket.OPEN) { + this.ws.send(JSON.stringify(data)); + } + } + + _onOpen() { + this.send({ + op: Constants.OPCodes.DISPATCH, + d: { + server_id: this.serverID, + user_id: this.voiceConnection.manager.client.user.id, + session_id: this.sessionID, + token: this.token, + }, + }); + } + + _onError(e) { + throw e; + } + + _onMessage(event) { + let packet; + try { + packet = JSON.parse(event.data); + } catch (error) { + return this._onError(error); + } + + switch (packet.op) { + case 2: + this.emit('ready-for-udp', packet.d); + break; + default: + break; + } + } +} + +module.exports = VoiceConnectionWebSocket; From e370ccf80676e42078e0d0eb75715b66c6981897 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 20:59:03 +0100 Subject: [PATCH 172/324] Complete voice connection --- docs/docs.json | 2 +- src/client/voice/VoiceConnection.js | 8 ++- src/client/voice/VoiceConnectionUDPClient.js | 71 +++++++++++++++++++- src/client/voice/VoiceConnectionWebSocket.js | 11 ++- src/util/Constants.js | 9 +++ 5 files changed, 97 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 9a7eb110e..46b9dce31 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471976003172},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":38,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":190,"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":209,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471982347898},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":38,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":190,"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":209,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 5fd965bbf..b422d23e7 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -1,17 +1,23 @@ const VoiceConnectionWebSocket = require('./VoiceConnectionWebSocket'); +const VoiceConnectionUDPClient = require('./VoiceConnectionUDPClient'); const EventEmitter = require('events').EventEmitter; class VoiceConnection extends EventEmitter { constructor(manager, serverID, token, sessionID, endpoint) { super(); this.manager = manager; + this.endpoint = endpoint; this.websocket = new VoiceConnectionWebSocket(this, serverID, token, sessionID, endpoint); + this.ready = false; this.bindListeners(); } bindListeners() { this.websocket.on('ready-for-udp', data => { - console.log(data); + this.udp = new VoiceConnectionUDPClient(this, data); + }); + this.websocket.on('ready', () => { + this.ready = true; }); } } diff --git a/src/client/voice/VoiceConnectionUDPClient.js b/src/client/voice/VoiceConnectionUDPClient.js index 537796267..0b13fd9a7 100644 --- a/src/client/voice/VoiceConnectionUDPClient.js +++ b/src/client/voice/VoiceConnectionUDPClient.js @@ -1,4 +1,73 @@ -class VoiceConnectionUDPClient { +const udp = require('dgram'); +const dns = require('dns'); +const Constants = require('../../util/Constants'); +const EventEmitter = require('events').EventEmitter; + +class VoiceConnectionUDPClient extends EventEmitter { + + constructor(voiceConnection, data) { + super(); + this.voiceConnection = voiceConnection; + this.count = 0; + this.data = data; + this.dnsLookup(); + } + + dnsLookup() { + dns.lookup(this.voiceConnection.endpoint, (err, address) => { + if (err) { + return this.emit('error', err); + } + this.connectUDP(address); + }); + } + + send(packet) { + if (this.udpSocket) { + try { + this.udpSocket.send(packet, 0, packet.length, this.data.port, this.udpIP); + } catch (err) { + return this.emit('error', err); + } + } + } + + connectUDP(address) { + this.udpIP = address; + this.udpSocket = udp.createSocket('udp4'); + + // finding local IP + // https://discordapp.com/developers/docs/topics/voice-connections#ip-discovery + this.udpSocket.once('message', message => { + const packet = new Buffer(message); + this.localIP = ''; + for (let i = 4; i < packet.indexOf(0, i); i++) { + this.localIP += String.fromCharCode(packet[i]); + } + + this.localPort = parseInt(packet.readUIntLE(packet.length - 2, 2).toString(10), 10); + + this.voiceConnection.websocket.send({ + op: Constants.VoiceOPCodes.SELECT_PROTOCOL, + d: { + protocol: 'udp', + data: { + address: this.localIP, + port: this.localPort, + mode: 'xsalsa20_poly1305', + }, + }, + }); + }); + + this.udpSocket.on('error', (error, message) => { + this.emit('error', { error, message }); + }); + + const blankMessage = new Buffer(70); + blankMessage.writeUIntBE(this.data.ssrc, 0, 4); + this.send(blankMessage); + } } diff --git a/src/client/voice/VoiceConnectionWebSocket.js b/src/client/voice/VoiceConnectionWebSocket.js index 8930a1f83..143ee1248 100644 --- a/src/client/voice/VoiceConnectionWebSocket.js +++ b/src/client/voice/VoiceConnectionWebSocket.js @@ -45,10 +45,19 @@ class VoiceConnectionWebSocket extends EventEmitter { } switch (packet.op) { - case 2: + case Constants.VoiceOPCodes.READY: this.emit('ready-for-udp', packet.d); break; + case Constants.VoiceOPCodes.SESSION_DESCRIPTION: + this.encryptionMode = packet.d.mode; + this.secretKey = new Uint8Array(new ArrayBuffer(packet.d.secret_key.length)); + for (const index in packet.d.secret_key) { + this.secretKey[index] = packet.d.secret_key[index]; + } + this.emit('ready'); + break; default: + this.emit('unknown', packet); break; } } diff --git a/src/util/Constants.js b/src/util/Constants.js index a24755c45..760984324 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -120,6 +120,15 @@ exports.OPCodes = { INVALID_SESSION: 9, }; +exports.VoiceOPCodes = { + IDENTIFY: 0, + SELECT_PROTOCOL: 1, + READY: 2, + HEARTBEAT: 3, + SESSION_DESCRIPTION: 4, + SPEAKING: 5, +}; + exports.Events = { READY: 'ready', GUILD_CREATE: 'guildCreate', From d0a76f3f386d88e08896ee8359a00c844f269fde Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 21:04:15 +0100 Subject: [PATCH 173/324] Promisify --- docs/docs.json | 2 +- src/client/voice/ClientVoiceManager.js | 20 ++++++++++++-------- src/client/voice/VoiceConnection.js | 13 ++++++++++++- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 46b9dce31..75ba3c385 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471982347898},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":38,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":190,"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":209,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471982659427},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":38,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":190,"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":209,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index 3972158f3..2fcc9cb77 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -32,8 +32,8 @@ class ClientVoiceManager { throw new Error('Guild not pending'); } if (pendingRequest.token && pendingRequest.sessionID && pendingRequest.endpoint) { - const { token, sessionID, endpoint } = pendingRequest; - const voiceConnection = new VoiceConnection(this, guildID, token, sessionID, endpoint); + const { token, sessionID, endpoint, resolve, reject } = pendingRequest; + const voiceConnection = new VoiceConnection(this, guildID, token, sessionID, endpoint, resolve, reject); this.connections.set(guildID, voiceConnection); } } @@ -93,13 +93,17 @@ class ClientVoiceManager { * @returns {null} */ joinChannel(channel) { - this.pending.set(channel.guild.id, { - channel, - sessionID: null, - token: null, - endpoint: null, + return new Promise((resolve, reject) => { + this.pending.set(channel.guild.id, { + channel, + sessionID: null, + token: null, + endpoint: null, + resolve, + reject, + }); + this._sendWSJoin(channel); }); - this._sendWSJoin(channel); } } diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index b422d23e7..3d7e00d3d 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -3,21 +3,32 @@ const VoiceConnectionUDPClient = require('./VoiceConnectionUDPClient'); const EventEmitter = require('events').EventEmitter; class VoiceConnection extends EventEmitter { - constructor(manager, serverID, token, sessionID, endpoint) { + constructor(manager, serverID, token, sessionID, endpoint, resolve, reject) { super(); this.manager = manager; this.endpoint = endpoint; this.websocket = new VoiceConnectionWebSocket(this, serverID, token, sessionID, endpoint); this.ready = false; + this._resolve = resolve; + this._reject = reject; this.bindListeners(); } + _onError(e) { + this._reject(e); + this.emit('error', e); + } + bindListeners() { + this.websocket.on('error', err => this._onError(err)); this.websocket.on('ready-for-udp', data => { this.udp = new VoiceConnectionUDPClient(this, data); + this.udp.on('error', err => this._onError(err)); }); this.websocket.on('ready', () => { this.ready = true; + this.emit('ready'); + this._resolve(this); }); } } From f9a553a7f0c16ef6d2edfab78ce81625c253d3d0 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 21:16:49 +0100 Subject: [PATCH 174/324] Documentation --- docs/docs.json | 2 +- src/client/Client.js | 9 +++++ src/client/voice/ClientVoiceManager.js | 9 ++++- src/client/voice/VoiceConnection.js | 52 +++++++++++++++++++++++++- src/structures/VoiceChannel.js | 9 +++++ 5 files changed, 76 insertions(+), 5 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 75ba3c385..1d324027d 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471982659427},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":38,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":190,"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":209,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"the new bitrate","type":{"types":[[["Number",""]]]}}]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471983412761},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":138,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":38,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":190,"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":209,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":9,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[],"properties":[{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["String",""]]]},"meta":{"line":22,"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":27,"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":38,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 6ef12b3a8..965cc5a4f 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -130,6 +130,15 @@ class Client extends EventEmitter { return this.rest.methods.loginToken(email); } + /** + * Returns a Collection, mapping Guild ID to Voice Connections. + * @readonly + * @type {Collection} + */ + get voiceConnections() { + return this.voice.connections; + } + } module.exports = Client; diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index 2fcc9cb77..414fd6882 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -26,14 +26,19 @@ class ClientVoiceManager { this.pending = new Collection(); } + /** + * Checks whether a pending request can be processed + * @private + * @param {String} guildID The ID of the Guild + */ _checkPendingReady(guildID) { const pendingRequest = this.pending.get(guildID); if (!pendingRequest) { throw new Error('Guild not pending'); } if (pendingRequest.token && pendingRequest.sessionID && pendingRequest.endpoint) { - const { token, sessionID, endpoint, resolve, reject } = pendingRequest; - const voiceConnection = new VoiceConnection(this, guildID, token, sessionID, endpoint, resolve, reject); + const { channel, token, sessionID, endpoint, resolve, reject } = pendingRequest; + const voiceConnection = new VoiceConnection(this, channel, token, sessionID, endpoint, resolve, reject); this.connections.set(guildID, voiceConnection); } } diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 3d7e00d3d..3da07af6a 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -2,23 +2,71 @@ const VoiceConnectionWebSocket = require('./VoiceConnectionWebSocket'); const VoiceConnectionUDPClient = require('./VoiceConnectionUDPClient'); const EventEmitter = require('events').EventEmitter; +/** + * Represents a connection to a Voice Channel in Discord + * @extends {EventEmitter} + */ class VoiceConnection extends EventEmitter { - constructor(manager, serverID, token, sessionID, endpoint, resolve, reject) { + constructor(manager, channel, token, sessionID, endpoint, resolve, reject) { super(); + /** + * The voice manager of this connection + * @type {ClientVoiceManager} + * @private + */ this.manager = manager; + /** + * The endpoint of the connection + * @type {String} + */ this.endpoint = endpoint; - this.websocket = new VoiceConnectionWebSocket(this, serverID, token, sessionID, endpoint); + /** + * The VoiceChannel for this connection + * @type {VoiceChannel} + */ + this.channel = channel; + /** + * The WebSocket connection for this voice connection + * @type {VoiceConnectionWebSocket} + * @private + */ + this.websocket = new VoiceConnectionWebSocket(this, channel.guild.id, token, sessionID, endpoint); + /** + * Whether or not the connection is ready + * @type {Boolean} + */ this.ready = false; + /** + * The resolve function for the promise associated with creating this connection + * @type {Function} + * @private + */ this._resolve = resolve; + /** + * The reject function for the promise associated with creating this connection + * @type {Function} + * @private + */ this._reject = reject; this.bindListeners(); } + /** + * Executed whenever an error occurs with the UDP/WebSocket sub-client + * @private + * @param {Error} error + * @returns {null} + */ _onError(e) { this._reject(e); this.emit('error', e); } + /** + * Binds listeners to the WebSocket and UDP sub-clients + * @returns {null} + * @private + */ bindListeners() { this.websocket.on('error', err => this._onError(err)); this.websocket.on('ready-for-udp', data => { diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index 9439da447..82cce7569 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -43,6 +43,15 @@ class VoiceChannel extends GuildChannel { return this.rest.client.rest.methods.updateChannel(this, { bitrate }); } + /** + * Attempts to join this Voice Channel + * @returns {Promise} + * @example + * // join a voice channel + * voiceChannel.join() + * .then(connection => console.log('Connected!')) + * .catch(console.log); + */ join() { return this.client.voice.joinChannel(this); } From 328f3c4ae8aca04a4c18410395daf1bba039d944 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 21:47:37 +0100 Subject: [PATCH 175/324] Add VoiceConnection.disconnect([reason]); --- docs/docs.json | 2 +- src/client/voice/ClientVoiceManager.js | 3 ++ src/client/voice/VoiceConnection.js | 35 ++++++++++++++++++++ src/client/voice/VoiceConnectionUDPClient.js | 17 ++++++++++ src/client/voice/VoiceConnectionWebSocket.js | 25 +++++++++++++- src/client/websocket/WebSocketManager.js | 1 - 6 files changed, 80 insertions(+), 3 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 1d324027d..f21db13eb 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471983412761},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":138,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":38,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":190,"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":209,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":9,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[],"properties":[{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["String",""]]]},"meta":{"line":22,"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":27,"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":38,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471985261571},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":138,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":38,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":10,"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":72,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"the reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["String",""]]]},"meta":{"line":23,"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":28,"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":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index 414fd6882..962c061dd 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -40,6 +40,9 @@ class ClientVoiceManager { const { channel, token, sessionID, endpoint, resolve, reject } = pendingRequest; const voiceConnection = new VoiceConnection(this, channel, token, sessionID, endpoint, resolve, reject); this.connections.set(guildID, voiceConnection); + voiceConnection.on('disconnected', () => { + this.connections.delete(guildID); + }); } } diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 3da07af6a..2051cfa46 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -1,5 +1,6 @@ const VoiceConnectionWebSocket = require('./VoiceConnectionWebSocket'); const VoiceConnectionUDPClient = require('./VoiceConnectionUDPClient'); +const Constants = require('../../util/Constants'); const EventEmitter = require('events').EventEmitter; /** @@ -60,6 +61,38 @@ class VoiceConnection extends EventEmitter { _onError(e) { this._reject(e); this.emit('error', e); + this._shutdown(e); + } + + /** + * Disconnects the Client from the Voice Channel + * @param {string} [reason='user requested'] the reason of the disconnection + * @returns {null} + */ + disconnect(reason = 'user requested') { + this.manager.client.ws.send({ + op: Constants.OPCodes.VOICE_STATE_UPDATE, + d: { + guild_id: this.channel.guild.id, + channel_id: null, + self_mute: false, + self_deaf: false, + }, + }); + return this._shutdown(reason); + } + + _onClose(e) { + return this._shutdown(e); + } + + _shutdown(e) { + this.ready = false; + this.websocket._shutdown(); + if (this.udp) { + this.udp._shutdown(); + } + this.emit('disconnected', e); } /** @@ -69,9 +102,11 @@ class VoiceConnection extends EventEmitter { */ bindListeners() { this.websocket.on('error', err => this._onError(err)); + this.websocket.on('close', err => this._onClose(err)); this.websocket.on('ready-for-udp', data => { this.udp = new VoiceConnectionUDPClient(this, data); this.udp.on('error', err => this._onError(err)); + this.udp.on('close', err => this._onClose(err)); }); this.websocket.on('ready', () => { this.ready = true; diff --git a/src/client/voice/VoiceConnectionUDPClient.js b/src/client/voice/VoiceConnectionUDPClient.js index 0b13fd9a7..6ccf63a08 100644 --- a/src/client/voice/VoiceConnectionUDPClient.js +++ b/src/client/voice/VoiceConnectionUDPClient.js @@ -32,6 +32,19 @@ class VoiceConnectionUDPClient extends EventEmitter { } } + _shutdown() { + if (this.udpSocket) { + try { + this.udpSocket.close(); + } catch (err) { + if (err.message !== 'Not running') { + this.emit('error', err); + } + } + this.udpSocket = null; + } + } + connectUDP(address) { this.udpIP = address; this.udpSocket = udp.createSocket('udp4'); @@ -64,6 +77,10 @@ class VoiceConnectionUDPClient extends EventEmitter { this.emit('error', { error, message }); }); + this.udpSocket.on('close', error => { + this.emit('close', error); + }); + const blankMessage = new Buffer(70); blankMessage.writeUIntBE(this.data.ssrc, 0, 4); this.send(blankMessage); diff --git a/src/client/voice/VoiceConnectionWebSocket.js b/src/client/voice/VoiceConnectionWebSocket.js index 143ee1248..c5faac84e 100644 --- a/src/client/voice/VoiceConnectionWebSocket.js +++ b/src/client/voice/VoiceConnectionWebSocket.js @@ -12,6 +12,8 @@ class VoiceConnectionWebSocket extends EventEmitter { this.ws = new WebSocket(`wss://${endpoint}`, null, { rejectUnauthorized: false }); this.ws.onopen = () => this._onOpen(); this.ws.onmessage = e => this._onMessage(e); + this.ws.onclose = e => this._onClose(e); + this.heartbeat = null; } send(data) { @@ -20,6 +22,14 @@ class VoiceConnectionWebSocket extends EventEmitter { } } + _shutdown() { + if (this.ws) { + this.ws.close(); + this.ws = null; + } + clearInterval(this.heartbeat); + } + _onOpen() { this.send({ op: Constants.OPCodes.DISPATCH, @@ -32,8 +42,20 @@ class VoiceConnectionWebSocket extends EventEmitter { }); } + _onClose(e) { + this.emit('close', e); + } + _onError(e) { - throw e; + this.emit('error', e); + } + + _setHeartbeat(interval) { + this.heartbeat = setInterval(() => { + this.send({ + op: Constants.VoiceOPCodes.HEARTBEAT, + }); + }, interval); } _onMessage(event) { @@ -46,6 +68,7 @@ class VoiceConnectionWebSocket extends EventEmitter { switch (packet.op) { case Constants.VoiceOPCodes.READY: + this._setHeartbeat(packet.d.heartbeat_interval); this.emit('ready-for-udp', packet.d); break; case Constants.VoiceOPCodes.SESSION_DESCRIPTION: diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 1a9a1d59d..190873b60 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -127,7 +127,6 @@ class WebSocketManager { * @returns {null} */ eventClose(event) { - console.log('close', event.code); if (event.code === 4004) { throw Constants.Errors.BAD_LOGIN; } From 48444a5444c6a92ac5f3fa8b013925712f95534b Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 23 Aug 2016 22:34:46 +0100 Subject: [PATCH 176/324] Fix voice channel members --- docs/docs.json | 2 +- .../packets/handlers/VoiceStateUpdate.js | 5 +++++ src/structures/Guild.js | 16 ++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index f21db13eb..28a6ac04a 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471985261571},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":138,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":38,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":92,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":10,"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":72,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"the reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["String",""]]]},"meta":{"line":23,"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":28,"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":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":118,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":155,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":329,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":342,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":427,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":441,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":455,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":469,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":483,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":497,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":196,"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":201,"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":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":211,"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":216,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"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":226,"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":231,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":236,"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":241,"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":246,"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":251,"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":256,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":270,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":283,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1471988090963},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":138,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":43,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":10,"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":72,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"the reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["String",""]]]},"meta":{"line":23,"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":28,"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":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":345,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":358,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":371,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":401,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":208,"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":213,"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":218,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":223,"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":228,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":233,"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":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":248,"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":253,"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":258,"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":263,"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":268,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":295,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/websocket/packets/handlers/VoiceStateUpdate.js b/src/client/websocket/packets/handlers/VoiceStateUpdate.js index 01d38242c..5603ef16d 100644 --- a/src/client/websocket/packets/handlers/VoiceStateUpdate.js +++ b/src/client/websocket/packets/handlers/VoiceStateUpdate.js @@ -22,6 +22,11 @@ class VoiceStateUpdateHandler extends AbstractHandler { client.voice._receivedVoiceStateUpdate(data.guild_id, data.session_id); } + const newChannel = client.channels.get(data.channel_id); + if (newChannel) { + newChannel.members.set(member.user.id, member); + } + member.serverMute = data.mute; member.serverDeaf = data.deaf; member.selfMute = data.self_mute; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index a2279cf64..11668e8ba 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -77,6 +77,18 @@ class Guild { guildUser.joined_at = guildUser.joined_at || 0; const member = new GuildMember(this, guildUser); this.members.set(member.id, member); + + if (this._rawVoiceStates && this._rawVoiceStates.get(member.user.id)) { + const voiceState = this._rawVoiceStates.get(member.user.id); + member.serverMute = voiceState.mute; + member.serverDeaf = voiceState.deaf; + member.selfMute = voiceState.self_mute; + member.selfDeaf = voiceState.self_deaf; + member.voiceSessionID = voiceState.session_id; + member.voiceChannelID = voiceState.channel_id; + this.channels.get(voiceState.channel_id).members.set(member.user.id, member); + } + if (this.client.ws.status === Constants.Status.READY && !noEvent) { this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, member); } @@ -300,8 +312,11 @@ class Guild { } } + this._rawVoiceStates = new Collection(); + if (data.voice_states) { for (const voiceState of data.voice_states) { + this._rawVoiceStates.set(voiceState.user_id, voiceState); const member = this.members.get(voiceState.user_id); if (member) { member.serverMute = voiceState.mute; @@ -310,6 +325,7 @@ class Guild { member.selfDeaf = voiceState.self_deaf; member.voiceSessionID = voiceState.session_id; member.voiceChannelID = voiceState.channel_id; + this.channels.get(voiceState.channel_id).members.set(member.user.id, member); } } } From 7892e62604da55fd9dc410be66287500902064c2 Mon Sep 17 00:00:00 2001 From: Hyper-Coder Date: Wed, 24 Aug 2016 12:16:22 -0400 Subject: [PATCH 177/324] Added Client.uptime (#533) * Added Client.uptime * Added Client.uptime * Update Client.js --- src/client/Client.js | 13 +++++++++++++ src/client/websocket/packets/handlers/Ready.js | 1 + 2 files changed, 14 insertions(+) diff --git a/src/client/Client.js b/src/client/Client.js index dfbd5c37b..c44df5453 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -94,6 +94,11 @@ class Client extends EventEmitter { * @type {?String} */ this.password = null; + /** + * The time in milliseconds the Client connected + * @type {?Number} + */ + this.readyTime = null; } /** @@ -124,6 +129,14 @@ class Client extends EventEmitter { return this.rest.methods.loginToken(email); } + /** + * The uptime for the logged in Client + * @type {?Number} + */ + get uptime() { + return this.readyTime ? Date.now() - this.readyTime : null; + } + } module.exports = Client; diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index 475d9b6eb..217127c77 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -11,6 +11,7 @@ class ReadyHandler extends AbstractHandler { const clientUser = new ClientUser(client, data.user); client.user = clientUser; + client.readyTime = Date.now(); client.users.set(clientUser.id, clientUser); for (const guild of data.guilds) { client.dataManager.newGuild(guild); From 8683f4581672dcfe302e68a823fc7a268b4d37b5 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 24 Aug 2016 21:38:48 +0100 Subject: [PATCH 178/324] errory voice --- docs/docs.json | 2 +- package.json | 5 +- src/client/voice/ClientVoiceManager.js | 14 +- src/client/voice/VoiceConnection.js | 17 +- src/client/voice/VoiceConnectionWebSocket.js | 14 +- .../voice/dispatcher/StreamDispatcher.js | 161 ++++++++++++++++++ src/client/voice/opus/BaseOpusEngine.js | 15 ++ src/client/voice/opus/NodeOpusEngine.js | 27 +++ src/client/voice/opus/OpusEngineList.js | 25 +++ src/client/voice/pcm/ConverterEngine.js | 13 ++ src/client/voice/pcm/ConverterEngineList.js | 1 + src/client/voice/pcm/FfmpegConverterEngine.js | 33 ++++ src/client/voice/player/BasePlayer.js | 93 ++++++++++ src/client/voice/player/DefaultPlayer.js | 15 ++ .../packets/handlers/VoiceStateUpdate.js | 7 +- src/structures/Guild.js | 14 +- src/structures/GuildMember.js | 5 + src/structures/VoiceChannel.js | 9 + src/util/Constants.js | 1 + test/random.js | 18 ++ 20 files changed, 476 insertions(+), 13 deletions(-) create mode 100644 src/client/voice/dispatcher/StreamDispatcher.js create mode 100644 src/client/voice/opus/BaseOpusEngine.js create mode 100644 src/client/voice/opus/NodeOpusEngine.js create mode 100644 src/client/voice/opus/OpusEngineList.js create mode 100644 src/client/voice/pcm/ConverterEngine.js create mode 100644 src/client/voice/pcm/ConverterEngineList.js create mode 100644 src/client/voice/pcm/FfmpegConverterEngine.js create mode 100644 src/client/voice/player/BasePlayer.js create mode 100644 src/client/voice/player/DefaultPlayer.js diff --git a/docs/docs.json b/docs/docs.json index 28a6ac04a..86d9ef72c 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1471988090963},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":138,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":43,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":10,"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":72,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"the reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["String",""]]]},"meta":{"line":23,"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":28,"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":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":345,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":358,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":371,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":384,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":401,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":208,"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":213,"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":218,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":223,"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":228,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":233,"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":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":248,"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":253,"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":258,"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":263,"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":268,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedChannel","name":"embedChannel","description":"The embed channel of the Guild.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":295,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":133,"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":141,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":75,"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":98,"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":107,"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":116,"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":125,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472071132749},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":138,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":78,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"the reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":347,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":216,"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":221,"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":226,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":231,"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":236,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":241,"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":246,"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":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":256,"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":261,"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":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":290,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/package.json b/package.json index 68e89f69a..4469dedcb 100644 --- a/package.json +++ b/package.json @@ -26,14 +26,15 @@ }, "homepage": "https://github.com/hydrabolt/discord.js#readme", "dependencies": { + "node-opus": "^0.1.13", "object.values": "^1.0.3", "superagent": "^1.5.0", + "tweetnacl": "^0.14.3", "ws": "^1.1.1" }, "devDependencies": { "fs-extra": "^0.30.0", - "jsdoc-parse": "^1.2.7", - "load-grunt-tasks": "^3.3.0" + "jsdoc-parse": "^1.2.7" }, "optionalDependencies": { "node-opus": "^0.1.11" diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index 962c061dd..6fd97dd57 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -39,8 +39,9 @@ class ClientVoiceManager { if (pendingRequest.token && pendingRequest.sessionID && pendingRequest.endpoint) { const { channel, token, sessionID, endpoint, resolve, reject } = pendingRequest; const voiceConnection = new VoiceConnection(this, channel, token, sessionID, endpoint, resolve, reject); + this.pending.delete(guildID); this.connections.set(guildID, voiceConnection); - voiceConnection.on('disconnected', () => { + voiceConnection.once('disconnected', () => { this.connections.delete(guildID); }); } @@ -102,6 +103,17 @@ class ClientVoiceManager { */ joinChannel(channel) { return new Promise((resolve, reject) => { + if (this.pending.get(channel.guild.id)) { + return reject(new Error('already connecting to a channel in this guild')); + } + const existingConn = this.connections.get(channel.guild.id); + if (existingConn) { + if (existingConn.channel.id !== channel.id) { + this._sendWSJoin(channel); + this.connections.get(channel.guild.id).channel = channel; + } + resolve(existingConn); + } this.pending.set(channel.guild.id, { channel, sessionID: null, diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 2051cfa46..aca3fc6a2 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -2,6 +2,7 @@ const VoiceConnectionWebSocket = require('./VoiceConnectionWebSocket'); const VoiceConnectionUDPClient = require('./VoiceConnectionUDPClient'); const Constants = require('../../util/Constants'); const EventEmitter = require('events').EventEmitter; +const DefaultPlayer = require('./player/DefaultPlayer'); /** * Represents a connection to a Voice Channel in Discord @@ -16,6 +17,11 @@ class VoiceConnection extends EventEmitter { * @private */ this.manager = manager; + /** + * The player + * @type {BasePlayer} + */ + this.player = new DefaultPlayer(this); /** * The endpoint of the connection * @type {String} @@ -83,12 +89,15 @@ class VoiceConnection extends EventEmitter { } _onClose(e) { + e = e && e.code === 1000 ? null : e; return this._shutdown(e); } _shutdown(e) { + console.log('being shut down! D:'); this.ready = false; this.websocket._shutdown(); + this.player._shutdown(); if (this.udp) { this.udp._shutdown(); } @@ -105,14 +114,20 @@ class VoiceConnection extends EventEmitter { this.websocket.on('close', err => this._onClose(err)); this.websocket.on('ready-for-udp', data => { this.udp = new VoiceConnectionUDPClient(this, data); + this.data = data; this.udp.on('error', err => this._onError(err)); this.udp.on('close', err => this._onClose(err)); }); - this.websocket.on('ready', () => { + this.websocket.on('ready', secretKey => { + this.data.secret = secretKey; this.ready = true; this.emit('ready'); this._resolve(this); }); + this.websocket.on('speaking', data => { + const guild = this.channel.guild; + guild._memberSpeakUpdate(data.user_id, data.speaking); + }); } } diff --git a/src/client/voice/VoiceConnectionWebSocket.js b/src/client/voice/VoiceConnectionWebSocket.js index c5faac84e..98fe32b53 100644 --- a/src/client/voice/VoiceConnectionWebSocket.js +++ b/src/client/voice/VoiceConnectionWebSocket.js @@ -54,8 +54,13 @@ class VoiceConnectionWebSocket extends EventEmitter { this.heartbeat = setInterval(() => { this.send({ op: Constants.VoiceOPCodes.HEARTBEAT, + d: null, }); }, interval); + this.send({ + op: Constants.VoiceOPCodes.HEARTBEAT, + d: null, + }); } _onMessage(event) { @@ -77,7 +82,14 @@ class VoiceConnectionWebSocket extends EventEmitter { for (const index in packet.d.secret_key) { this.secretKey[index] = packet.d.secret_key[index]; } - this.emit('ready'); + this.emit('ready', this.secretKey); + break; + case Constants.VoiceOPCodes.SPEAKING: + /* + { op: 5, + d: { user_id: '123123', ssrc: 1, speaking: true } } + */ + this.emit('speaking', packet.d); break; default: this.emit('unknown', packet); diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js new file mode 100644 index 000000000..36b066d2e --- /dev/null +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -0,0 +1,161 @@ +const EventEmitter = require('events').EventEmitter; +const NaCl = require('tweetnacl'); + +const nonce = new Buffer(24); +nonce.fill(0); + +class StreamDispatcher extends EventEmitter { + constructor(player, stream) { + super(); + this.player = player; + this.stream = stream; + this.streamingData = { + channels: 2, + }; + this._startStreaming(); + this._triggered = false; + } + + _setSpeaking(value) { + this.speaking = value; + this.emit('speaking', value); + } + + _sendBuffer(buffer, sequence, timestamp) { + this.player.connection.udp.send( + this._createPacket(sequence, timestamp, this.player.opusEncoder.encode(buffer)) + ); + } + + _createPacket(sequence, timestamp, buffer) { + const packetBuffer = new Buffer(buffer.length + 28); + packetBuffer.fill(0); + packetBuffer[0] = 0x80; + packetBuffer[1] = 0x78; + + packetBuffer.writeUIntBE(sequence, 2, 2); + packetBuffer.writeUIntBE(timestamp, 4, 4); + packetBuffer.writeUIntBE(this.player.connection.data.ssrc, 8, 4); + + packetBuffer.copy(nonce, 0, 0, 12); + buffer = NaCl.secretbox(buffer, nonce, this.player.connection.data.secret); + + for (let i = 0; i < buffer.length; i++) { + packetBuffer[i + 12] = buffer[i]; + } + + return packetBuffer; + } + + _send() { + try { + if (this._triggered) { + return this._setSpeaking(false); + } + const data = this.streamingData; + if (data.missed >= 5) { + return this._triggerTerminalState('error', new Error('stream is not generating fast enough')); + } + if (this.paused) { + data.timestamp = (data.timestamp + 4294967295) ? data.timestamp + 960 : 0; + return setTimeout(() => this._send(), data.length * 10); + } + const bufferLength = 1920 * data.channels; + this._setSpeaking(true); + let buffer = this.stream.read(bufferLength); + + if (!buffer) { + data.missed++; + return setTimeout(() => this._send(), data.length * 10); + } + + data.missed = 0; + + if (buffer.length !== bufferLength) { + const newBuffer = new Buffer(bufferLength).fill(0); + buffer.copy(newBuffer); + buffer = newBuffer; + } + + data.count++; + data.sequence = (data.sequence + 1) < (65536) ? data.sequence + 1 : 0; + data.timestamp = (data.timestamp + 4294967295) ? data.timestamp + 960 : 0; + + this._sendBuffer(buffer, data.sequence, data.timestamp); + + const nextTime = data.startTime + (data.count * data.length); + + setTimeout(() => this._send(), data.length + (nextTime - Date.now())); + } catch (e) { + this._triggerTerminalState('error', e); + } + } + + _triggerEnd() { + this.emit('end'); + } + + _triggerError(e) { + this.emit('error', e); + } + + _triggerTerminalState(state, e) { + if (this._triggered) { + return; + } + this.emit('debug', `triggered terminal state ${state} - stream is now dead`); + this._triggered = true; + this._setSpeaking(false); + switch (state) { + case 'end': + this._triggerEnd(e); + break; + case 'error': + this._triggerError(e); + break; + default: + this.emit('error', 'unknown trigger state'); + break; + } + } + + _startStreaming() { + if (!this.stream) { + return this.emit('error', 'no stream'); + } + this.stream.on('end', e => this._triggerTerminalState('end', e)); + this.stream.on('error', e => this._triggerTerminalState('error', e)); + const data = this.streamingData; + data.count = 0; + data.sequence = 0; + data.timestamp = 0; + data.length = 20; + data.missed = 0; + data.startTime = Date.now(); + this._send(); + } + + _pause(value) { + if (value) { + this.paused = true; + this._setSpeaking(false); + } else { + this.paused = false; + this._setSpeaking(true); + } + } + + end() { + this._triggerTerminalState('end', 'user requested'); + } + + pause() { + this._pause(true); + } + + resume() { + this._pause(false); + } +} + +module.exports = StreamDispatcher; diff --git a/src/client/voice/opus/BaseOpusEngine.js b/src/client/voice/opus/BaseOpusEngine.js new file mode 100644 index 000000000..6c3ba6e34 --- /dev/null +++ b/src/client/voice/opus/BaseOpusEngine.js @@ -0,0 +1,15 @@ +class BaseOpus { + constructor(player) { + this.player = player; + } + + encode(buffer) { + return buffer; + } + + decode(buffer) { + return buffer; + } +} + +module.exports = BaseOpus; diff --git a/src/client/voice/opus/NodeOpusEngine.js b/src/client/voice/opus/NodeOpusEngine.js new file mode 100644 index 000000000..2305174a7 --- /dev/null +++ b/src/client/voice/opus/NodeOpusEngine.js @@ -0,0 +1,27 @@ +const OpusEngine = require('./BaseOpusEngine'); + +let opus; + +class NodeOpusEngine extends OpusEngine { + constructor(player) { + super(player); + try { + opus = require('node-opus'); + } catch (err) { + throw err; + } + this.encoder = new opus.OpusEncoder(48000, 2); + } + + encode(buffer) { + super.encode(buffer); + return this.encoder.encode(buffer, 1920); + } + + decode(buffer) { + super.encode(buffer); + return this.encoder.decode(buffer, 1920); + } +} + +module.exports = NodeOpusEngine; diff --git a/src/client/voice/opus/OpusEngineList.js b/src/client/voice/opus/OpusEngineList.js new file mode 100644 index 000000000..b30a7c860 --- /dev/null +++ b/src/client/voice/opus/OpusEngineList.js @@ -0,0 +1,25 @@ +const list = [ + require('./NodeOpusEngine'), +]; + +exports.add = encoder => { + list.push(encoder); +}; + +function fetch(Encoder) { + try { + return new Encoder(); + } catch (err) { + return; + } +} + +exports.fetch = () => { + for (const encoder of list) { + const success = fetch(encoder); + if (success) { + return success; + } + } + throw new Error('could not find an opus engine'); +}; diff --git a/src/client/voice/pcm/ConverterEngine.js b/src/client/voice/pcm/ConverterEngine.js new file mode 100644 index 000000000..be2ab5f4d --- /dev/null +++ b/src/client/voice/pcm/ConverterEngine.js @@ -0,0 +1,13 @@ +class ConverterEngine { + + constructor(player) { + this.player = player; + } + + createConvertStream() { + return; + } + +} + +module.exports = ConverterEngine; diff --git a/src/client/voice/pcm/ConverterEngineList.js b/src/client/voice/pcm/ConverterEngineList.js new file mode 100644 index 000000000..56d430e48 --- /dev/null +++ b/src/client/voice/pcm/ConverterEngineList.js @@ -0,0 +1 @@ +exports.fetch = () => require('./FfmpegConverterEngine'); diff --git a/src/client/voice/pcm/FfmpegConverterEngine.js b/src/client/voice/pcm/FfmpegConverterEngine.js new file mode 100644 index 000000000..78932e13a --- /dev/null +++ b/src/client/voice/pcm/FfmpegConverterEngine.js @@ -0,0 +1,33 @@ +const ConverterEngine = require('./ConverterEngine'); +const ChildProcess = require('child_process'); + +function chooseCommand() { + for (const cmd of ['ffmpeg', 'avconv', './ffmpeg', './avconv']) { + if (!ChildProcess.spawnSync(cmd, ['-h']).error) { + return cmd; + } + } +} + +class FfmpegConverterEngine extends ConverterEngine { + constructor(player) { + super(player); + this.command = chooseCommand(); + } + + createConvertStream() { + super.createConvertStream(); + const encoder = ChildProcess.spawn(this.command, [ + '-analyzeduration', '0', + '-loglevel', '0', + '-i', '-', + '-f', 's16le', + '-ar', '48000', + '-ss', '0', + 'pipe:1', + ], { stdio: ['pipe', 'pipe', 'ignore'] }); + return encoder; + } +} + +module.exports = FfmpegConverterEngine; diff --git a/src/client/voice/player/BasePlayer.js b/src/client/voice/player/BasePlayer.js new file mode 100644 index 000000000..973767b88 --- /dev/null +++ b/src/client/voice/player/BasePlayer.js @@ -0,0 +1,93 @@ +const OpusEngines = require('../opus/OpusEngineList'); +const ConverterEngines = require('../pcm/ConverterEngineList'); +const Constants = require('../../../util/Constants'); +const StreamDispatcher = require('../dispatcher/StreamDispatcher'); +const EventEmitter = require('events').EventEmitter; + +class VoiceConnectionPlayer extends EventEmitter { + + constructor(connection) { + super(); + this.connection = connection; + this.opusEncoder = OpusEngines.fetch(); + const Engine = ConverterEngines.fetch(); + this.converterEngine = new Engine(this); + this.speaking = false; + this.processMap = new Map(); + } + + convertStream(stream) { + const encoder = this.converterEngine.createConvertStream(); + stream.pipe(encoder.stdin); + this.processMap.set(encoder.stdout, { + pcmConverter: encoder, + inputStream: stream, + }); + return encoder.stdout; + } + + _shutdown() { + for (const stream of this.processMap.keys()) { + this.killStream(stream); + } + } + + killStream(stream) { + const streams = this.processMap.get(stream); + this.emit('debug', 'cleaning up streams after end/error'); + if (streams) { + if (streams.inputStream && streams.pcmConverter) { + try { + if (streams.pcmConverter.stdin) { + streams.pcmConverter.stdin.end(); + this.emit('debug', 'stream kill part 1/5 pass'); + } + if (streams.pcmConverter.stdout.destroy) { + streams.pcmConverter.stdout.destroy(); + this.emit('debug', 'stream kill part 2/5 pass'); + } + if (streams.pcmConverter && streams.pcmConverter.kill) { + streams.pcmConverter.kill('SIGINT'); + this.emit('debug', 'stream kill part 3/5 pass'); + } + if (streams.inputStream.unpipe) { + streams.inputStream.unpipe(streams.pcmConverter.stdin); + this.emit('debug', 'stream kill part 4/5 pass'); + } + if (streams.inputStream.destroy) { + streams.inputStream.destroy(); + this.emit('debug', 'stream kill part 5/5 pass'); + } + } catch (e) { + console.log(e); + return e; + } + } + } + } + + setSpeaking(value) { + if (this.speaking === value) { + return; + } + this.speaking = value; + this.connection.websocket.send({ + op: Constants.VoiceOPCodes.SPEAKING, + d: { + speaking: value, + delay: 0, + }, + }); + } + + playPCMStream(pcmStream) { + const dispatcher = new StreamDispatcher(this, pcmStream); + dispatcher.on('speaking', value => this.setSpeaking(value)); + dispatcher.on('end', () => this.killStream(pcmStream)); + dispatcher.on('error', () => this.killStream(pcmStream)); + return dispatcher; + } + +} + +module.exports = VoiceConnectionPlayer; diff --git a/src/client/voice/player/DefaultPlayer.js b/src/client/voice/player/DefaultPlayer.js new file mode 100644 index 000000000..70ac60080 --- /dev/null +++ b/src/client/voice/player/DefaultPlayer.js @@ -0,0 +1,15 @@ +const BasePlayer = require('./BasePlayer'); +const fs = require('fs-extra'); + +class DefaultPlayer extends BasePlayer { + + playFile(file) { + const fileStream = fs.createReadStream(file).on('error', console.log); + const pcmStream = this.convertStream(fileStream).on('error', console.log); + const dispatcher = this.playPCMStream(pcmStream); + return dispatcher; + } + +} + +module.exports = DefaultPlayer; diff --git a/src/client/websocket/packets/handlers/VoiceStateUpdate.js b/src/client/websocket/packets/handlers/VoiceStateUpdate.js index 5603ef16d..ba7fe4e81 100644 --- a/src/client/websocket/packets/handlers/VoiceStateUpdate.js +++ b/src/client/websocket/packets/handlers/VoiceStateUpdate.js @@ -18,7 +18,12 @@ class VoiceStateUpdateHandler extends AbstractHandler { member.voiceChannel.members.delete(oldVoiceChannelMember.id); } - if (client.voice.pending.has(guild.id)) { + // if the member left the voice channel, unset their speaking property + if (!data.channel_id) { + member.speaking = null; + } + + if (client.voice.pending.has(guild.id) && member.user.id === client.user.id && data.channel_id) { client.voice._receivedVoiceStateUpdate(data.guild_id, data.session_id); } diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 11668e8ba..034601837 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -192,6 +192,14 @@ class Guild { return base; } + _memberSpeakUpdate(user, speaking) { + const member = this.members.get(user); + if (member) { + member.speaking = speaking; + } + this.client.emit(Constants.Events.GUILD_MEMBER_SPEAKING, member, speaking); + } + /** * Sets up the Guild * @param {any} data @@ -288,12 +296,6 @@ class Guild { } } - /** - * The embed channel of the Guild. - * @type {GuildChannel} - */ - this.embedChannel = this.channels.get(data.embed_channel_id); - if (data.roles) { this.roles.clear(); for (const role of data.roles) { diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index bc38719dd..4ebb583c5 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -64,6 +64,11 @@ class GuildMember { * @type {Date} */ this.joinDate = new Date(data.joined_at); + /** + * Whether this meember is speaking + * @type {?Boolean} + */ + this.speaking = this.speaking; this._roles = data.roles; } diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index 82cce7569..e4cf5ae6e 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -55,6 +55,15 @@ class VoiceChannel extends GuildChannel { join() { return this.client.voice.joinChannel(this); } + + leave() { + const exists = this.client.voice.connections.get(this.guild.id); + if (exists) { + if (exists.channel.id === this.id) { + exists.disconnect(); + } + } + } } module.exports = VoiceChannel; diff --git a/src/util/Constants.js b/src/util/Constants.js index 760984324..cfff76fa0 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -159,6 +159,7 @@ exports.Events = { MESSAGE_DELETE: 'messageDelete', MESSAGE_UPDATE: 'messageUpdate', RECONNECTING: 'reconnecting', + GUILD_MEMBER_SPEAKING: 'guildMemberSpeaking', }; exports.WSEvents = { diff --git a/test/random.js b/test/random.js index 3d6f0f844..4c918a16c 100644 --- a/test/random.js +++ b/test/random.js @@ -177,6 +177,11 @@ client.on('messageUpdate', (old, message) => { console.log('Message updated from', old.content, 'to', message.content); }); +client.on('guildMemberSpeaking', (member, speaking) => { + const message = speaking ? `${member.user.username} is speaking` : `${member.user.username} is not speaking`; + member.guild.channels.get(member.guild.id).sendMessage(message); +}); + client.on('message', msg => { if (msg.content.startsWith('?raw')) { msg.channel.sendMessage('```' + msg.content + '```'); @@ -191,3 +196,16 @@ client.on('message', msg => { } } }); + +let disp; + +client.on('message', msg => { + if (msg.content.startsWith('/join')) { + const chan = msg.content.split(' ').slice(1).join(' '); + msg.channel.guild.channels.get(chan).join() + .then(conn => { + msg.reply('done'); + }) + .catch(console.log); + } +}) From 253789f398fb12b69e7f39f939e35868200130d5 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 24 Aug 2016 22:26:27 +0100 Subject: [PATCH 179/324] PLS WORK --- docs/docs.json | 2 +- src/client/voice/VoiceConnection.js | 4 +++- src/client/voice/VoiceConnectionUDPClient.js | 1 + src/client/voice/VoiceConnectionWebSocket.js | 9 +++++++-- src/client/voice/pcm/FfmpegConverterEngine.js | 3 +++ src/client/voice/player/BasePlayer.js | 13 ++++++++----- test/random.js | 3 +++ 7 files changed, 26 insertions(+), 9 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 86d9ef72c..d3c413896 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472071132749},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":138,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":78,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"the reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":347,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":216,"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":221,"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":226,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":231,"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":236,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":241,"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":246,"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":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":256,"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":261,"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":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":290,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472073992230},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":138,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":78,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"the reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":347,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":216,"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":221,"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":226,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":231,"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":236,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":241,"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":246,"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":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":256,"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":261,"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":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":290,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index aca3fc6a2..20eb307c3 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -94,7 +94,9 @@ class VoiceConnection extends EventEmitter { } _shutdown(e) { - console.log('being shut down! D:'); + if (!this.ready) { + return; + } this.ready = false; this.websocket._shutdown(); this.player._shutdown(); diff --git a/src/client/voice/VoiceConnectionUDPClient.js b/src/client/voice/VoiceConnectionUDPClient.js index 6ccf63a08..14754e4ed 100644 --- a/src/client/voice/VoiceConnectionUDPClient.js +++ b/src/client/voice/VoiceConnectionUDPClient.js @@ -74,6 +74,7 @@ class VoiceConnectionUDPClient extends EventEmitter { }); this.udpSocket.on('error', (error, message) => { + console.log(error); this.emit('error', { error, message }); }); diff --git a/src/client/voice/VoiceConnectionWebSocket.js b/src/client/voice/VoiceConnectionWebSocket.js index 98fe32b53..c7f482b7b 100644 --- a/src/client/voice/VoiceConnectionWebSocket.js +++ b/src/client/voice/VoiceConnectionWebSocket.js @@ -13,19 +13,24 @@ class VoiceConnectionWebSocket extends EventEmitter { this.ws.onopen = () => this._onOpen(); this.ws.onmessage = e => this._onMessage(e); this.ws.onclose = e => this._onClose(e); + this.ws.onerror = e => this._onError(e); + this.ws.on('error', console.log); this.heartbeat = null; } send(data) { if (this.ws.readyState === WebSocket.OPEN) { - this.ws.send(JSON.stringify(data)); + console.log('sending'); + this.ws.send(JSON.stringify(data), function ack(error) { + if (error) + console.log(error); + }); } } _shutdown() { if (this.ws) { this.ws.close(); - this.ws = null; } clearInterval(this.heartbeat); } diff --git a/src/client/voice/pcm/FfmpegConverterEngine.js b/src/client/voice/pcm/FfmpegConverterEngine.js index 78932e13a..4854a29a0 100644 --- a/src/client/voice/pcm/FfmpegConverterEngine.js +++ b/src/client/voice/pcm/FfmpegConverterEngine.js @@ -26,6 +26,9 @@ class FfmpegConverterEngine extends ConverterEngine { '-ss', '0', 'pipe:1', ], { stdio: ['pipe', 'pipe', 'ignore'] }); + encoder.on('error', console.log); + encoder.stdin.on('error', console.log); + encoder.stdin.on('error', console.log); return encoder; } } diff --git a/src/client/voice/player/BasePlayer.js b/src/client/voice/player/BasePlayer.js index 973767b88..c1c2f6b98 100644 --- a/src/client/voice/player/BasePlayer.js +++ b/src/client/voice/player/BasePlayer.js @@ -38,14 +38,18 @@ class VoiceConnectionPlayer extends EventEmitter { if (streams) { if (streams.inputStream && streams.pcmConverter) { try { - if (streams.pcmConverter.stdin) { - streams.pcmConverter.stdin.end(); - this.emit('debug', 'stream kill part 1/5 pass'); - } + streams.pcmConverter.on('error', console.log); + streams.pcmConverter.stdin.on('error', console.log); + streams.pcmConverter.stdout.on('error', console.log); + streams.inputStream.stdout.on('error', console.log); if (streams.pcmConverter.stdout.destroy) { streams.pcmConverter.stdout.destroy(); this.emit('debug', 'stream kill part 2/5 pass'); } + if (streams.pcmConverter.stdin) { + streams.pcmConverter.stdin.end(); + this.emit('debug', 'stream kill part 1/5 pass'); + } if (streams.pcmConverter && streams.pcmConverter.kill) { streams.pcmConverter.kill('SIGINT'); this.emit('debug', 'stream kill part 3/5 pass'); @@ -59,7 +63,6 @@ class VoiceConnectionPlayer extends EventEmitter { this.emit('debug', 'stream kill part 5/5 pass'); } } catch (e) { - console.log(e); return e; } } diff --git a/test/random.js b/test/random.js index 4c918a16c..b48c4b542 100644 --- a/test/random.js +++ b/test/random.js @@ -205,6 +205,9 @@ client.on('message', msg => { msg.channel.guild.channels.get(chan).join() .then(conn => { msg.reply('done'); + const f = '04 Out of the Woods.m4a'; + conn.player.playFile(`C:/Users/amish/Desktop/${f}`); + conn.player.on('debug', console.log); }) .catch(console.log); } From cdb74a75f2e0853a86595ab659447f913867f675 Mon Sep 17 00:00:00 2001 From: LewisHogan Date: Wed, 24 Aug 2016 23:38:07 +0100 Subject: [PATCH 180/324] Indev rewrite - Changed GuildChannel type (#536) * Altered GuildChannel.type to return a string containing either "text", "voice" or the id of the channel type. * Fixed typo * Altered code to pass ESLint test (Functionality Unchanged). * Third times the charm. --- src/structures/GuildChannel.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index b8f6b196a..96ff2be4e 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -33,9 +33,11 @@ class GuildChannel extends Channel { super.setup(data); /** * The type of the Guild Channel - * @type {Number} + * @type {String} */ - this.type = data.type; + if (data.type === 0) this.type = 'text'; + else if (data.type === 2) this.type = 'voice'; + else this.type = data.type.toString(); /** * The topic of the Guild Channel, if there is one. * @type {?String} From d6f5df39fce9fd9e9fa246db8c7f1dea15beb95b Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 25 Aug 2016 14:24:06 +0100 Subject: [PATCH 181/324] voice stuff --- docs/docs.json | 2 +- src/client/voice/ClientVoiceManager.js | 2 +- src/client/voice/VoiceConnectionUDPClient.js | 1 - src/client/voice/VoiceConnectionWebSocket.js | 26 +++++++++++++------ src/client/voice/pcm/ConverterEngine.js | 5 +++- src/client/voice/pcm/FfmpegConverterEngine.js | 13 +++++++--- src/client/voice/player/BasePlayer.js | 22 ++++++++-------- src/client/voice/player/DefaultPlayer.js | 1 + src/structures/Guild.js | 4 +-- test/random.js | 2 -- 10 files changed, 48 insertions(+), 30 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index d3c413896..85085dbdf 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472073992230},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":138,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":78,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"the reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":347,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":216,"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":221,"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":226,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":231,"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":236,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":241,"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":246,"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":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":256,"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":261,"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":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":290,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472131459621},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":138,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":78,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"the reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":347,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":216,"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":221,"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":226,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":231,"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":236,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":241,"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":246,"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":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":256,"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":261,"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":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":290,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index 6fd97dd57..cac695c44 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -112,7 +112,7 @@ class ClientVoiceManager { this._sendWSJoin(channel); this.connections.get(channel.guild.id).channel = channel; } - resolve(existingConn); + return resolve(existingConn); } this.pending.set(channel.guild.id, { channel, diff --git a/src/client/voice/VoiceConnectionUDPClient.js b/src/client/voice/VoiceConnectionUDPClient.js index 14754e4ed..6ccf63a08 100644 --- a/src/client/voice/VoiceConnectionUDPClient.js +++ b/src/client/voice/VoiceConnectionUDPClient.js @@ -74,7 +74,6 @@ class VoiceConnectionUDPClient extends EventEmitter { }); this.udpSocket.on('error', (error, message) => { - console.log(error); this.emit('error', { error, message }); }); diff --git a/src/client/voice/VoiceConnectionWebSocket.js b/src/client/voice/VoiceConnectionWebSocket.js index c7f482b7b..91df129ad 100644 --- a/src/client/voice/VoiceConnectionWebSocket.js +++ b/src/client/voice/VoiceConnectionWebSocket.js @@ -9,22 +9,25 @@ class VoiceConnectionWebSocket extends EventEmitter { this.token = token; this.sessionID = sessionID; this.serverID = serverID; - this.ws = new WebSocket(`wss://${endpoint}`, null, { rejectUnauthorized: false }); + this.heartbeat = null; + this.opened = false; + this.endpoint = endpoint; + this.attempts = 6; + this.setupWS(); + } + + setupWS() { + this.attempts--; + this.ws = new WebSocket(`wss://${this.endpoint}`, null, { rejectUnauthorized: false }); this.ws.onopen = () => this._onOpen(); this.ws.onmessage = e => this._onMessage(e); this.ws.onclose = e => this._onClose(e); this.ws.onerror = e => this._onError(e); - this.ws.on('error', console.log); - this.heartbeat = null; } send(data) { if (this.ws.readyState === WebSocket.OPEN) { - console.log('sending'); - this.ws.send(JSON.stringify(data), function ack(error) { - if (error) - console.log(error); - }); + this.ws.send(JSON.stringify(data)); } } @@ -36,6 +39,7 @@ class VoiceConnectionWebSocket extends EventEmitter { } _onOpen() { + this.opened = true; this.send({ op: Constants.OPCodes.DISPATCH, d: { @@ -48,10 +52,16 @@ class VoiceConnectionWebSocket extends EventEmitter { } _onClose(e) { + if (!this.opened && this.attempts >= 0) { + return this.setupWS(); + } this.emit('close', e); } _onError(e) { + if (!this.opened && this.attempts >= 0) { + return this.setupWS(); + } this.emit('error', e); } diff --git a/src/client/voice/pcm/ConverterEngine.js b/src/client/voice/pcm/ConverterEngine.js index be2ab5f4d..d8d2d424e 100644 --- a/src/client/voice/pcm/ConverterEngine.js +++ b/src/client/voice/pcm/ConverterEngine.js @@ -1,6 +1,9 @@ -class ConverterEngine { +const EventEmitter = require('events').EventEmitter; + +class ConverterEngine extends EventEmitter { constructor(player) { + super(); this.player = player; } diff --git a/src/client/voice/pcm/FfmpegConverterEngine.js b/src/client/voice/pcm/FfmpegConverterEngine.js index 4854a29a0..f5b44a799 100644 --- a/src/client/voice/pcm/FfmpegConverterEngine.js +++ b/src/client/voice/pcm/FfmpegConverterEngine.js @@ -15,6 +15,13 @@ class FfmpegConverterEngine extends ConverterEngine { this.command = chooseCommand(); } + handleError(encoder, err) { + if (encoder.destroy) { + encoder.destroy(); + } + this.emit('error', err); + } + createConvertStream() { super.createConvertStream(); const encoder = ChildProcess.spawn(this.command, [ @@ -26,9 +33,9 @@ class FfmpegConverterEngine extends ConverterEngine { '-ss', '0', 'pipe:1', ], { stdio: ['pipe', 'pipe', 'ignore'] }); - encoder.on('error', console.log); - encoder.stdin.on('error', console.log); - encoder.stdin.on('error', console.log); + encoder.on('error', e => this.handleError(encoder, e)); + encoder.stdin.on('error', e => this.handleError(encoder, e)); + encoder.stdout.on('error', e => this.handleError(encoder, e)); return encoder; } } diff --git a/src/client/voice/player/BasePlayer.js b/src/client/voice/player/BasePlayer.js index c1c2f6b98..c5fe38ad7 100644 --- a/src/client/voice/player/BasePlayer.js +++ b/src/client/voice/player/BasePlayer.js @@ -12,6 +12,10 @@ class VoiceConnectionPlayer extends EventEmitter { this.opusEncoder = OpusEngines.fetch(); const Engine = ConverterEngines.fetch(); this.converterEngine = new Engine(this); + this.converterEngine.on('error', err => { + this._shutdown(); + this.emit('error', err); + }); this.speaking = false; this.processMap = new Map(); } @@ -38,25 +42,21 @@ class VoiceConnectionPlayer extends EventEmitter { if (streams) { if (streams.inputStream && streams.pcmConverter) { try { - streams.pcmConverter.on('error', console.log); - streams.pcmConverter.stdin.on('error', console.log); - streams.pcmConverter.stdout.on('error', console.log); - streams.inputStream.stdout.on('error', console.log); + if (streams.inputStream.unpipe) { + streams.inputStream.unpipe(streams.pcmConverter.stdin); + this.emit('debug', 'stream kill part 4/5 pass'); + } if (streams.pcmConverter.stdout.destroy) { streams.pcmConverter.stdout.destroy(); this.emit('debug', 'stream kill part 2/5 pass'); } - if (streams.pcmConverter.stdin) { - streams.pcmConverter.stdin.end(); - this.emit('debug', 'stream kill part 1/5 pass'); - } if (streams.pcmConverter && streams.pcmConverter.kill) { streams.pcmConverter.kill('SIGINT'); this.emit('debug', 'stream kill part 3/5 pass'); } - if (streams.inputStream.unpipe) { - streams.inputStream.unpipe(streams.pcmConverter.stdin); - this.emit('debug', 'stream kill part 4/5 pass'); + if (streams.pcmConverter.stdin) { + streams.pcmConverter.stdin.end(); + this.emit('debug', 'stream kill part 1/5 pass'); } if (streams.inputStream.destroy) { streams.inputStream.destroy(); diff --git a/src/client/voice/player/DefaultPlayer.js b/src/client/voice/player/DefaultPlayer.js index 70ac60080..bae36dd11 100644 --- a/src/client/voice/player/DefaultPlayer.js +++ b/src/client/voice/player/DefaultPlayer.js @@ -4,6 +4,7 @@ const fs = require('fs-extra'); class DefaultPlayer extends BasePlayer { playFile(file) { + this._shutdown(); const fileStream = fs.createReadStream(file).on('error', console.log); const pcmStream = this.convertStream(fileStream).on('error', console.log); const dispatcher = this.playPCMStream(pcmStream); diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 034601837..daa740e16 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -194,10 +194,10 @@ class Guild { _memberSpeakUpdate(user, speaking) { const member = this.members.get(user); - if (member) { + if (member && member.speaking !== speaking) { member.speaking = speaking; + this.client.emit(Constants.Events.GUILD_MEMBER_SPEAKING, member, speaking); } - this.client.emit(Constants.Events.GUILD_MEMBER_SPEAKING, member, speaking); } /** diff --git a/test/random.js b/test/random.js index b48c4b542..9c55c8dea 100644 --- a/test/random.js +++ b/test/random.js @@ -205,8 +205,6 @@ client.on('message', msg => { msg.channel.guild.channels.get(chan).join() .then(conn => { msg.reply('done'); - const f = '04 Out of the Woods.m4a'; - conn.player.playFile(`C:/Users/amish/Desktop/${f}`); conn.player.on('debug', console.log); }) .catch(console.log); From 7b2d76429f98eec3ea78baa9cf6888cb74dfc117 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 25 Aug 2016 14:28:21 +0100 Subject: [PATCH 182/324] remove console.log --- docs/docs.json | 2 +- src/client/voice/player/DefaultPlayer.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 85085dbdf..abf2cad3f 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472131459621},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":124,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"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":138,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":78,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"the reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":347,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":216,"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":221,"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":226,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":231,"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":236,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":241,"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":246,"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":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":256,"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":261,"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":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":290,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":73,"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#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":105,"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.log);"],"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":237,"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.log);"],"meta":{"line":251,"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.log);"],"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"TextChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":73,"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#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":105,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":185,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":237,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":251,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":265,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":279,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#type","name":"type","description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["Number",""]]]},"meta":{"line":38,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":43,"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":48,"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":53,"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":59,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":161,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472131707033},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":78,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"the reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":347,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":216,"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":221,"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":226,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":231,"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":236,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":241,"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":246,"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":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":256,"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":261,"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":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":290,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":75,"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#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":107,"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.log);"],"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":239,"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.log);"],"meta":{"line":253,"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.log);"],"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":163,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/player/DefaultPlayer.js b/src/client/voice/player/DefaultPlayer.js index bae36dd11..cc4309081 100644 --- a/src/client/voice/player/DefaultPlayer.js +++ b/src/client/voice/player/DefaultPlayer.js @@ -5,8 +5,8 @@ class DefaultPlayer extends BasePlayer { playFile(file) { this._shutdown(); - const fileStream = fs.createReadStream(file).on('error', console.log); - const pcmStream = this.convertStream(fileStream).on('error', console.log); + const fileStream = fs.createReadStream(file); + const pcmStream = this.convertStream(fileStream); const dispatcher = this.playPCMStream(pcmStream); return dispatcher; } From 6d7e649bb1e6480fb9eccf3fbde88c7d4826be35 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 25 Aug 2016 14:49:10 +0100 Subject: [PATCH 183/324] fix some voice stuff --- docs/docs.json | 2 +- src/client/voice/dispatcher/StreamDispatcher.js | 2 +- src/client/voice/player/DefaultPlayer.js | 8 ++++++-- test/random.js | 5 ++++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index abf2cad3f..885c1d876 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472131707033},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":78,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"the reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":347,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":216,"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":221,"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":226,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":231,"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":236,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":241,"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":246,"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":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":256,"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":261,"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":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":290,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":75,"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#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":107,"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.log);"],"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":239,"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.log);"],"meta":{"line":253,"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.log);"],"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":163,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472132958217},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":78,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"the reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":347,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":216,"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":221,"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":226,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":231,"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":236,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":241,"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":246,"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":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":256,"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":261,"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":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":290,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":75,"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#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":107,"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.log);"],"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":239,"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.log);"],"meta":{"line":253,"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.log);"],"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":163,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 36b066d2e..acf45a14b 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -132,7 +132,7 @@ class StreamDispatcher extends EventEmitter { data.length = 20; data.missed = 0; data.startTime = Date.now(); - this._send(); + this.stream.once('readable', () => this._send()); } _pause(value) { diff --git a/src/client/voice/player/DefaultPlayer.js b/src/client/voice/player/DefaultPlayer.js index cc4309081..66d832c16 100644 --- a/src/client/voice/player/DefaultPlayer.js +++ b/src/client/voice/player/DefaultPlayer.js @@ -5,8 +5,12 @@ class DefaultPlayer extends BasePlayer { playFile(file) { this._shutdown(); - const fileStream = fs.createReadStream(file); - const pcmStream = this.convertStream(fileStream); + return this.playStream(fs.createReadStream(file)); + } + + playStream(stream) { + this._shutdown(); + const pcmStream = this.convertStream(stream); const dispatcher = this.playPCMStream(pcmStream); return dispatcher; } diff --git a/test/random.js b/test/random.js index 9c55c8dea..0765e9117 100644 --- a/test/random.js +++ b/test/random.js @@ -197,7 +197,7 @@ client.on('message', msg => { } }); -let disp; +const ytdl = require('ytdl-core'); client.on('message', msg => { if (msg.content.startsWith('/join')) { @@ -205,7 +205,10 @@ client.on('message', msg => { msg.channel.guild.channels.get(chan).join() .then(conn => { msg.reply('done'); + const disp = conn.player.playStream(ytdl('https://www.youtube.com/watch?v=nbXgHAzUWB0', {filter : 'audioonly'})); conn.player.on('debug', console.log); + conn.player.on('error', err => console.log(123, err)); + disp.on('error', err => console.log(123, err)); }) .catch(console.log); } From fe3fdb7d6ad5c44938bce1fe7b8aea9c60edfe79 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 25 Aug 2016 19:12:09 +0100 Subject: [PATCH 184/324] document voice --- docs/docs.json | 2 +- package.json | 3 -- src/client/voice/VoiceConnection.js | 48 +++++++++++++++++++ .../voice/dispatcher/StreamDispatcher.js | 37 ++++++++++++++ src/structures/VoiceChannel.js | 7 +++ 5 files changed, 93 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 885c1d876..0a0b01da3 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472132958217},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":78,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"the reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":347,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":216,"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":221,"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":226,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":231,"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":236,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":241,"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":246,"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":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":256,"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":261,"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":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":290,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":75,"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#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":107,"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.log);"],"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":239,"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.log);"],"meta":{"line":253,"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.log);"],"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":163,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472148743373},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"the debug information","type":{"types":[[["String",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":83,"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.log);"],"meta":{"line":161,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":179,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"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":69,"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":111,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":136,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":347,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":216,"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":221,"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":226,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":231,"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":236,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":241,"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":246,"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":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":256,"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":261,"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":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":290,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":75,"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#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":107,"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.log);"],"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":239,"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.log);"],"meta":{"line":253,"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.log);"],"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":163,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/package.json b/package.json index 4469dedcb..b9e53fda2 100644 --- a/package.json +++ b/package.json @@ -36,9 +36,6 @@ "fs-extra": "^0.30.0", "jsdoc-parse": "^1.2.7" }, - "optionalDependencies": { - "node-opus": "^0.1.11" - }, "engines": { "node": ">=0.12.7" }, diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 20eb307c3..1e447efc7 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -66,6 +66,11 @@ class VoiceConnection extends EventEmitter { */ _onError(e) { this._reject(e); + /** + * Emitted whenever the connection encounters a fatal error. + * @event VoiceConnection#error + * @param {Error} error the encountered error + */ this.emit('error', e); this._shutdown(e); } @@ -103,6 +108,11 @@ class VoiceConnection extends EventEmitter { if (this.udp) { this.udp._shutdown(); } + /** + * Emit once the voice connection has disconnected. + * @event VoiceConnection#disconnected + * @param {Error} error the error, if any + */ this.emit('disconnected', e); } @@ -123,6 +133,10 @@ class VoiceConnection extends EventEmitter { this.websocket.on('ready', secretKey => { this.data.secret = secretKey; this.ready = true; + /** + * Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway) + * @event VoiceConnection#ready + */ this.emit('ready'); this._resolve(this); }); @@ -131,6 +145,40 @@ class VoiceConnection extends EventEmitter { guild._memberSpeakUpdate(data.user_id, data.speaking); }); } + + /** + * Play the given file in the voice connection + * @param {String} filepath the path to the file + * @returns {StreamDispatcher} + * @example + * // play files natively + * voiceChannel.join() + * .then(connection => { + * const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3'); + * }) + * .catch(console.log); + */ + playFile(file) { + return this.player.playFile(file); + } + + /** + * Play the given stream in the voice connection + * @param {ReadableStream} stream the audio stream to play + * @returns {StreamDispatcher} + * @example + * // play streams using ytdl-core + * const ytdl = require('ytdl-core'); + * voiceChannel.join() + * .then(connection => { + * const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'}); + * const dispatcher = connection.playStream(stream); + * }) + * .catch(console.log); + */ + playStream(stream) { + return this.player.playStream(stream); + } } module.exports = VoiceConnection; diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index acf45a14b..59b999fd5 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -4,6 +4,10 @@ const NaCl = require('tweetnacl'); const nonce = new Buffer(24); nonce.fill(0); +/** + * The class that sends voice packet data to the voice connection. + * @extends {EventEmitter} + */ class StreamDispatcher extends EventEmitter { constructor(player, stream) { super(); @@ -16,6 +20,11 @@ class StreamDispatcher extends EventEmitter { this._triggered = false; } + /** + * Emitted when the dispatcher starts/stops speaking + * @event StreamDispatcher#speaking + * @param {Boolean} value whether or not the dispatcher is speaking + */ _setSpeaking(value) { this.speaking = value; this.emit('speaking', value); @@ -91,11 +100,21 @@ class StreamDispatcher extends EventEmitter { } } + /** + * Emitted once the stream has ended. Attach a `once` listener to this. + * @event StreamDispatcher#end + */ _triggerEnd() { this.emit('end'); } + /** + * Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`. + * @event StreamDispatcher#error + * @param {Error} error the error encountered + */ _triggerError(e) { + this.emit('end'); this.emit('error', e); } @@ -103,6 +122,12 @@ class StreamDispatcher extends EventEmitter { if (this._triggered) { return; } + + /** + * Emitted when the stream wants to give debug information. + * @event StreamDispatcher#debug + * @param {String} information the debug information + */ this.emit('debug', `triggered terminal state ${state} - stream is now dead`); this._triggered = true; this._setSpeaking(false); @@ -145,14 +170,26 @@ class StreamDispatcher extends EventEmitter { } } + /** + * Stops the current stream permanently and emits an `end` event. + * @returns {null} + */ end() { this._triggerTerminalState('end', 'user requested'); } + /** + * Stops sending voice packets to the voice connection (stream may still progress however) + * @returns {null} + */ pause() { this._pause(true); } + /** + * Resumes sending voice packets to the voice connection (may be further on in the stream than when paused) + * @returns {null} + */ resume() { this._pause(false); } diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index e4cf5ae6e..f036343aa 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -56,6 +56,13 @@ class VoiceChannel extends GuildChannel { return this.client.voice.joinChannel(this); } + /** + * Leaves this voice channel + * @returns {null} + * @example + * // leave a voice channel + * voiceChannel.leave(); + */ leave() { const exists = this.client.voice.connections.get(this.guild.id); if (exists) { From 64b0e6bc8438e91b6a4962ce98e0ada5055f170c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 25 Aug 2016 19:13:22 +0100 Subject: [PATCH 185/324] guildMemberSpeaking docs --- docs/docs.json | 2 +- src/structures/Guild.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 0a0b01da3..42cf9a24d 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472148743373},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"the debug information","type":{"types":[[["String",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":83,"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.log);"],"meta":{"line":161,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":179,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"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":69,"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":111,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":136,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":347,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":216,"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":221,"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":226,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":231,"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":236,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":241,"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":246,"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":251,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":256,"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":261,"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":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":290,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":75,"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#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":107,"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.log);"],"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":239,"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.log);"],"meta":{"line":253,"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.log);"],"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":163,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472148818688},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":199,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"the debug information","type":{"types":[[["String",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":83,"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.log);"],"meta":{"line":161,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":179,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"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":69,"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":111,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":136,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":353,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":379,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":392,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":409,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":423,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":437,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":451,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":465,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":479,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":493,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":222,"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":227,"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":232,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":237,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":247,"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":252,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":262,"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":267,"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":272,"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":277,"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":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":296,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":75,"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#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":107,"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.log);"],"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":239,"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.log);"],"meta":{"line":253,"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.log);"],"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":163,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index daa740e16..4d4c98faa 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -196,6 +196,12 @@ class Guild { const member = this.members.get(user); if (member && member.speaking !== speaking) { member.speaking = speaking; + /** + * Emitted once a Guild Member starts/stops speaking + * @event Client#guildMemberSpeaking + * @param {GuildMember} member the member that started/stopped speaking + * @param {Boolean} speaking whether or not the member is speaking + */ this.client.emit(Constants.Events.GUILD_MEMBER_SPEAKING, member, speaking); } } From 8d094cdfb1c32ff7f49e3bdce703b949941ffa01 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 25 Aug 2016 19:41:19 +0100 Subject: [PATCH 186/324] Add channel.type --- docs/docs.json | 2 +- src/structures/Channel.js | 10 +++++++++- src/structures/DMChannel.js | 1 + src/structures/GroupDMChannel.js | 1 + src/structures/GuildChannel.js | 7 ------- src/structures/TextChannel.js | 1 + src/structures/VoiceChannel.js | 1 + 7 files changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 42cf9a24d..7bc9390a6 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472148818688},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":199,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"the debug information","type":{"types":[[["String",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":83,"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.log);"],"meta":{"line":161,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":179,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"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":69,"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":111,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":136,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]}]},{"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.log); // log error"],"meta":{"line":39,"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#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["String",""]]]},"meta":{"line":27,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":37,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":353,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":379,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":392,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":409,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":423,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":437,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":451,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":465,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":479,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":493,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":222,"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":227,"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":232,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":237,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":247,"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":252,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":262,"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":267,"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":272,"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":277,"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":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":296,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":75,"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#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":107,"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.log);"],"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":239,"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.log);"],"meta":{"line":253,"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.log);"],"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":27,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":42,"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.log);"],"meta":{"line":55,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":75,"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#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":107,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":187,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":239,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":253,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":267,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":281,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":45,"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":50,"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":55,"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":61,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":163,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472150487405},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":199,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"the debug information","type":{"types":[[["String",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":83,"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.log);"],"meta":{"line":161,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":179,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"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":69,"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":111,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":136,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]}]},{"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":353,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":379,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":392,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":409,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":423,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":437,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":451,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":465,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":479,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":493,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":222,"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":227,"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":232,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":237,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":247,"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":252,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":262,"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":267,"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":272,"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":277,"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":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":296,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":100,"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.log);"],"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":232,"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.log);"],"meta":{"line":246,"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.log);"],"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":156,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/Channel.js b/src/structures/Channel.js index ae8a9715b..ab0a9d747 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -13,7 +13,15 @@ class Channel { if (guild) { this.guild = guild; } - + /** + * The type of the channel, either: + * * `dm` - a DM channel + * * `group` - a Group DM channel + * * `text` - a guild text channel + * * `voice` - a guild voice channel + * @type {String} + */ + this.type = null; if (data) { this.setup(data); } diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 6d6b2a2c5..80b55a8e6 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -27,6 +27,7 @@ class DMChannel extends Channel { * @type {?String} */ this.lastMessageID = data.last_message_id; + this.type = 'dm'; } /** diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index a46c23f72..4db62ee81 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -112,6 +112,7 @@ class GroupDMChannel extends Channel { * @type {User} */ this.owner = this.client.users.get(data.owner_id); + this.type = 'group'; } sendMessage() { diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 96ff2be4e..987a0c0b7 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -31,13 +31,6 @@ class GuildChannel extends Channel { setup(data) { super.setup(data); - /** - * The type of the Guild Channel - * @type {String} - */ - if (data.type === 0) this.type = 'text'; - else if (data.type === 2) this.type = 'voice'; - else this.type = data.type.toString(); /** * The topic of the Guild Channel, if there is one. * @type {?String} diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index b7ce043f4..3f5b7ce70 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -21,6 +21,7 @@ class TextChannel extends GuildChannel { * @type {?String} */ this.lastMessageID = data.last_message_id; + this.type = 'text'; } sendMessage() { diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index f036343aa..2266cc524 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -27,6 +27,7 @@ class VoiceChannel extends GuildChannel { * @type {Number} */ this.userLimit = data.user_limit; + this.type = 'voice'; } /** From ccf513a2fcea12e3e8e1cc7ae2ae64d34710e3eb Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 25 Aug 2016 21:38:44 +0100 Subject: [PATCH 187/324] Fix DMs breaking --- docs/docs.json | 2 +- src/client/ClientDataManager.js | 3 +- src/util/Constants.js | 2 +- test/random.js | 64 --------------------------------- 4 files changed, 4 insertions(+), 67 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 7bc9390a6..174fa0494 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472150487405},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":199,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"the debug information","type":{"types":[[["String",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":83,"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.log);"],"meta":{"line":161,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":179,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"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":69,"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":111,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":136,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]}]},{"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":353,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":379,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":392,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":409,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":423,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":437,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":451,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":465,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":479,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":493,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":222,"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":227,"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":232,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":237,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":247,"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":252,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":262,"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":267,"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":272,"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":277,"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":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":296,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":100,"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.log);"],"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":232,"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.log);"],"meta":{"line":246,"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.log);"],"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":156,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472157530502},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":199,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"the debug information","type":{"types":[[["String",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":83,"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.log);"],"meta":{"line":161,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":179,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"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":69,"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":111,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":136,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]}]},{"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":353,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":379,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":392,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":409,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":423,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":437,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":451,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":465,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":479,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":493,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":222,"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":227,"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":232,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":237,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":247,"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":252,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":262,"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":267,"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":272,"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":277,"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":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":296,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":100,"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.log);"],"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":232,"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.log);"],"meta":{"line":246,"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.log);"],"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":156,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/ClientDataManager.js b/src/client/ClientDataManager.js index b10332c72..0d7269936 100644 --- a/src/client/ClientDataManager.js +++ b/src/client/ClientDataManager.js @@ -69,7 +69,8 @@ class ClientDataManager { this.client.emit(Constants.Events.CHANNEL_CREATE, channel); } - return this.client.channels.set(channel.id, channel); + this.client.channels.set(channel.id, channel); + return channel; } return null; } diff --git a/src/util/Constants.js b/src/util/Constants.js index cfff76fa0..531ec7635 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -69,7 +69,7 @@ exports.Errors = { BAD_LOGIN: new Error('incorrect login details were provided'), }; -const API = 'https://discordapp.com/api'; +const API = `https://discordapp.com/api/v${exports.DefaultOptions.protocol_version}`; const Endpoints = exports.Endpoints = { // general endpoints diff --git a/test/random.js b/test/random.js index 0765e9117..e82815d4c 100644 --- a/test/random.js +++ b/test/random.js @@ -11,70 +11,6 @@ client.on('ready', () => { console.log('ready!'); }); -client.on('guildCreate', (guild) => { - console.log(guild); -}); -client.on('guildDelete', (guild) => { - console.log('guilddel', guild.name); -}); -client.on('guildUpdate', (old, guild) => { - console.log('guildupdate', old.name, guild.name); -}); -client.on('channelCreate', channel => { - console.log(channel); -}); -client.on('channelDelete', channel => { - console.log('channDel', channel.name); -}); - -client.on('channelUpdate', (old, chan) => { - console.log('chan update', old.name, chan.name); -}); - -client.on('guildMemberAdd', (guild, user) => { - console.log('new guild member', user.user.username, 'in', guild.name); -}); - -client.on('guildMemberRemove', (guild, user) => { - console.log('dead guild member', user.user.username, 'in', guild.name); -}); - -client.on('guildRoleCreate', (guild, role) => { - console.log('new role', role.name, 'in', guild.name); - role.edit({ - permissions: ['DEAFEN_MEMBERS'], - name: 'deafen', - }).then(role2 => { - console.log('role replace from ' + role.name + ' to ' + role2.name); - }).catch(console.log); -}); - -client.on('guildRoleDelete', (guild, role) => { - console.log('dead role', role.name, 'in', guild.name); -}); - -client.on('guildRoleUpdate', (guild, old, newRole) => { - console.log('updated role', old.name, 'to', newRole.name, 'in', guild.name); -}); - -client.on('presenceUpdate', (oldUser, newUser) => { - // console.log('presence from', oldUser.username, 'to', newUser.username); -}); - -client.on('voiceStateUpdate', (oldMember, newMember) => { - console.log('voiceState', oldMember.user.username, oldMember.voiceChannel + '', newMember.voiceChannel + ''); -}); - -client.on('typingStart.', (channel, user) => { - if (user.username === 'hydrabolt') - console.log(user.username, 'started typing in', channel.name); -}); - -client.on('typingStop.', (channel, user, data) => { - if (user.username === 'hydrabolt') - console.log(user.username, 'stopped typing in', channel.name, 'after', data.elapsedTime + 'ms'); -}); - client.on('message', message => { if (true) { if (message.content === 'makechann') { From 7ba37a35116843d9eb32d0d0d2fca1f5e770d8c0 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 25 Aug 2016 22:02:36 +0100 Subject: [PATCH 188/324] fix eslint for opus --- docs/docs.json | 2 +- package.json | 4 +++- src/client/voice/opus/NodeOpusEngine.js | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 174fa0494..714e5c780 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472157530502},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":199,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"the debug information","type":{"types":[[["String",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":83,"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.log);"],"meta":{"line":161,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":179,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"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":69,"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":111,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":136,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]}]},{"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":353,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":379,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":392,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":409,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":423,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":437,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":451,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":465,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":479,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":493,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":222,"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":227,"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":232,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":237,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":247,"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":252,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":262,"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":267,"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":272,"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":277,"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":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":296,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":100,"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.log);"],"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":232,"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.log);"],"meta":{"line":246,"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.log);"],"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":156,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472158961685},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":199,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"the debug information","type":{"types":[[["String",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":83,"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.log);"],"meta":{"line":161,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":179,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"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":69,"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":111,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":136,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]}]},{"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":353,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":379,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":392,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":409,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":423,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":437,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":451,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":465,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":479,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":493,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":222,"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":227,"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":232,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":237,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":247,"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":252,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":262,"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":267,"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":272,"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":277,"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":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":296,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":100,"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.log);"],"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":232,"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.log);"],"meta":{"line":246,"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.log);"],"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":156,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/package.json b/package.json index b9e53fda2..63ffc7d98 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ }, "homepage": "https://github.com/hydrabolt/discord.js#readme", "dependencies": { - "node-opus": "^0.1.13", "object.values": "^1.0.3", "superagent": "^1.5.0", "tweetnacl": "^0.14.3", @@ -36,6 +35,9 @@ "fs-extra": "^0.30.0", "jsdoc-parse": "^1.2.7" }, + "optionalDependencies": { + "node-opus": "^0.1.13" + }, "engines": { "node": ">=0.12.7" }, diff --git a/src/client/voice/opus/NodeOpusEngine.js b/src/client/voice/opus/NodeOpusEngine.js index 2305174a7..8f8ba7ca0 100644 --- a/src/client/voice/opus/NodeOpusEngine.js +++ b/src/client/voice/opus/NodeOpusEngine.js @@ -6,6 +6,7 @@ class NodeOpusEngine extends OpusEngine { constructor(player) { super(player); try { + // eslint-disable-next-line import/no-unresolved opus = require('node-opus'); } catch (err) { throw err; From 8038903c3e39ffb53cbb5ef56c07420fc9e5805d Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 25 Aug 2016 17:06:32 -0400 Subject: [PATCH 189/324] Fixed user.equals(null) (#540) This fixes `user.equals` when passing `null` or `undefined`. --- src/structures/User.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/structures/User.js b/src/structures/User.js index 3fc94e2a9..0a17abafb 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -81,6 +81,7 @@ class User { */ equals(user) { let base = ( + user && this.username === user.username && this.id === user.id && this.discriminator === user.discriminator && From 2d6068010b3a6bfbeb7d53733bc53e812f9bf6e1 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 25 Aug 2016 22:40:16 +0100 Subject: [PATCH 190/324] Create basic voice receiving --- docs/docs.json | 2 +- src/client/voice/VoiceConnection.js | 9 +++++ src/client/voice/receiver/VoiceReceiver.js | 45 ++++++++++++++++++++++ test/random.js | 2 + 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 src/client/voice/receiver/VoiceReceiver.js diff --git a/docs/docs.json b/docs/docs.json index 714e5c780..bc9b6ec84 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472158961685},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":199,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"the debug information","type":{"types":[[["String",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":11,"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":83,"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.log);"],"meta":{"line":161,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":179,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":24,"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":29,"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":34,"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":45,"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":69,"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":111,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":136,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]}]},{"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":353,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":379,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":392,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":409,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":423,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":437,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":451,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":465,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":479,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":493,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":222,"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":227,"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":232,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":237,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":247,"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":252,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":262,"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":267,"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":272,"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":277,"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":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":296,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":100,"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.log);"],"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":232,"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.log);"],"meta":{"line":246,"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.log);"],"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":156,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472161221929},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":199,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":11,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[],"properties":[{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"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":26,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"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":33,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"buffer","description":"the decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":12,"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":84,"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.log);"],"meta":{"line":162,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":180,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":188,"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":25,"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":30,"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":35,"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":46,"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":70,"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":112,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]}]},{"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":353,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":379,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":392,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":409,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":423,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":437,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":451,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":465,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":479,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":493,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":222,"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":227,"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":232,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":237,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":247,"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":252,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":262,"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":267,"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":272,"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":277,"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":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":296,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":100,"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.log);"],"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":232,"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.log);"],"meta":{"line":246,"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.log);"],"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":156,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 1e447efc7..95e6a544d 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -1,5 +1,6 @@ const VoiceConnectionWebSocket = require('./VoiceConnectionWebSocket'); const VoiceConnectionUDPClient = require('./VoiceConnectionUDPClient'); +const VoiceReceiver = require('./receiver/VoiceReceiver'); const Constants = require('../../util/Constants'); const EventEmitter = require('events').EventEmitter; const DefaultPlayer = require('./player/DefaultPlayer'); @@ -179,6 +180,14 @@ class VoiceConnection extends EventEmitter { playStream(stream) { return this.player.playStream(stream); } + + /** + * Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these. + * @returns {VoiceReceiver} + */ + createReceiver() { + return new VoiceReceiver(this); + } } module.exports = VoiceConnection; diff --git a/src/client/voice/receiver/VoiceReceiver.js b/src/client/voice/receiver/VoiceReceiver.js new file mode 100644 index 000000000..2f25e151c --- /dev/null +++ b/src/client/voice/receiver/VoiceReceiver.js @@ -0,0 +1,45 @@ +const EventEmitter = require('events').EventEmitter; +const NaCl = require('tweetnacl'); + +const nonce = new Buffer(24); +nonce.fill(0); + +/** + * Receives voice data from a voice connection. + * @extends {EventEmitter} + */ +class VoiceReceiver extends EventEmitter { + constructor(connection) { + super(); + /** + * The VoiceConnection that instantiated this + * @type {VoiceConnection} + */ + this.connection = connection; + this.connection.udp.udpSocket.on('message', msg => { + msg.copy(nonce, 0, 0, 12); + let data = NaCl.secretbox.open(msg.slice(12), nonce, this.connection.data.secret); + if (!data) { + return this.emit('warn', 'failed to decrypt voice packet'); + } + data = new Buffer(data); + /** + * Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM). + * @event VoiceReceiver#opus + * @param {Buffer} buffer the opus buffer + */ + this.emit('opus', data); + if (this.listenerCount('pcm') > 0) { + /** + * Emits decoded voice data when it's received. For performance reasons, the decoding will only + * happen if there is at least one `pcm` listener on this receiver. + * @event VoiceReceiver#pcm + * @param {Buffer} buffer the decoded buffer + */ + this.emit('pcm', this.connection.player.opusEncoder.decode(data)); + } + }); + } +} + +module.exports = VoiceReceiver; diff --git a/test/random.js b/test/random.js index e82815d4c..13bd7981c 100644 --- a/test/random.js +++ b/test/random.js @@ -144,6 +144,8 @@ client.on('message', msg => { const disp = conn.player.playStream(ytdl('https://www.youtube.com/watch?v=nbXgHAzUWB0', {filter : 'audioonly'})); conn.player.on('debug', console.log); conn.player.on('error', err => console.log(123, err)); + const receiver = conn.createReceiver(); + receiver.on('pcm', console.log); disp.on('error', err => console.log(123, err)); }) .catch(console.log); From 48762c642c2c4f3255d3000667f91b759de5cab9 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 25 Aug 2016 23:11:58 +0100 Subject: [PATCH 191/324] Make voice receiving better --- docs/docs.json | 2 +- src/client/voice/VoiceConnection.js | 2 + src/client/voice/receiver/VoiceReceiver.js | 50 +++++++++++++++++----- test/random.js | 4 +- 4 files changed, 46 insertions(+), 12 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index bc9b6ec84..516bb1a0c 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472161221929},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":199,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":11,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[],"properties":[{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"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":26,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"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":33,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"buffer","description":"the decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord","meta":{"line":12,"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":84,"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.log);"],"meta":{"line":162,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":180,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":188,"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":25,"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":30,"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":35,"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":46,"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":70,"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":112,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]}]},{"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":353,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":379,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":392,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":409,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":423,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":437,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":451,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":465,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":479,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":493,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":222,"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":227,"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":232,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":237,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":247,"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":252,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":262,"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":267,"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":272,"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":277,"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":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":296,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":100,"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.log);"],"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":232,"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.log);"],"meta":{"line":246,"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.log);"],"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":156,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472163123253},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":199,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":11,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[],"properties":[{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":23,"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":47,"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":55,"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":63,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":164,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":182,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":190,"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":25,"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":30,"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":35,"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":46,"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":71,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":138,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]}]},{"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":353,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":379,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":392,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":409,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":423,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":437,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":451,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":465,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":479,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":493,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":222,"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":227,"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":232,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":237,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":247,"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":252,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":262,"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":267,"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":272,"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":277,"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":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":296,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":100,"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.log);"],"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":232,"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.log);"],"meta":{"line":246,"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.log);"],"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":156,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 95e6a544d..cca32837e 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -56,6 +56,7 @@ class VoiceConnection extends EventEmitter { * @private */ this._reject = reject; + this.ssrcMap = new Map(); this.bindListeners(); } @@ -143,6 +144,7 @@ class VoiceConnection extends EventEmitter { }); this.websocket.on('speaking', data => { const guild = this.channel.guild; + this.ssrcMap.set(+data.ssrc, this.manager.client.users.get(data.user_id)); guild._memberSpeakUpdate(data.user_id, data.speaking); }); } diff --git a/src/client/voice/receiver/VoiceReceiver.js b/src/client/voice/receiver/VoiceReceiver.js index 2f25e151c..33f0f9e34 100644 --- a/src/client/voice/receiver/VoiceReceiver.js +++ b/src/client/voice/receiver/VoiceReceiver.js @@ -11,34 +11,64 @@ nonce.fill(0); class VoiceReceiver extends EventEmitter { constructor(connection) { super(); + /* + need a queue because we don't get the ssrc of the user speaking until after the first few packets, + so we queue up unknown SSRCs until they become known, then empty the queue. + */ + this.queues = new Map(); /** * The VoiceConnection that instantiated this * @type {VoiceConnection} */ this.connection = connection; this.connection.udp.udpSocket.on('message', msg => { - msg.copy(nonce, 0, 0, 12); - let data = NaCl.secretbox.open(msg.slice(12), nonce, this.connection.data.secret); - if (!data) { - return this.emit('warn', 'failed to decrypt voice packet'); + const ssrc = +msg.readUInt32BE(8).toString(10); + const user = this.connection.ssrcMap.get(ssrc); + if (!user) { + if (!this.queues.has(ssrc)) { + this.queues.set(ssrc, []); + } + this.queues.get(ssrc).push(msg); } - data = new Buffer(data); + if (user) { + if (this.queues.get(ssrc)) { + this.queues.get(ssrc).push(msg); + this.queues.get(ssrc).map(m => this.handlePacket(m, user)); + this.queues.delete(ssrc); + } + } + }); + } + + handlePacket(msg, user) { + msg.copy(nonce, 0, 0, 12); + let data = NaCl.secretbox.open(msg.slice(12), nonce, this.connection.data.secret); + if (!data) { + /** + * Emitted whenever a voice packet cannot be decrypted + * @event VoiceReceiver#warn + * @param {String} message the warning message + */ + return this.emit('warn', 'failed to decrypt voice packet'); + } + data = new Buffer(data); /** * Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM). * @event VoiceReceiver#opus + * @param {User} user the user that is sending the buffer (is speaking) * @param {Buffer} buffer the opus buffer */ - this.emit('opus', data); - if (this.listenerCount('pcm') > 0) { + this.emit('opus', user, data); + if (this.listenerCount('pcm') > 0) { /** * Emits decoded voice data when it's received. For performance reasons, the decoding will only * happen if there is at least one `pcm` listener on this receiver. * @event VoiceReceiver#pcm + * @param {User} user the user that is sending the buffer (is speaking) * @param {Buffer} buffer the decoded buffer */ - this.emit('pcm', this.connection.player.opusEncoder.decode(data)); - } - }); + this.emit('pcm', user, this.connection.player.opusEncoder.decode(data)); + } } } diff --git a/test/random.js b/test/random.js index 13bd7981c..7ee7481a4 100644 --- a/test/random.js +++ b/test/random.js @@ -145,7 +145,9 @@ client.on('message', msg => { conn.player.on('debug', console.log); conn.player.on('error', err => console.log(123, err)); const receiver = conn.createReceiver(); - receiver.on('pcm', console.log); + receiver.on('pcm', u => { + console.log(u.username); + }); disp.on('error', err => console.log(123, err)); }) .catch(console.log); From 0a005cbd1665e7c37b40f3626207fa0e5824e7bf Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 25 Aug 2016 19:14:19 -0400 Subject: [PATCH 192/324] Fix other .equals(null) (#541) --- src/structures/GroupDMChannel.js | 1 + src/structures/Guild.js | 1 + src/structures/GuildChannel.js | 1 + src/structures/Role.js | 1 + 4 files changed, 4 insertions(+) diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index 4db62ee81..231ac406b 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -55,6 +55,7 @@ class GroupDMChannel extends Channel { equals(other) { const base = ( + other && this.id === other.id && this.name === other.name && this.icon === other.icon && diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 4d4c98faa..13409fa16 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -166,6 +166,7 @@ class Guild { */ equals(data) { let base = + data && this.id === data.id && this.available === !data.unavailable && this.splash === data.splash && diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 987a0c0b7..90a08cbf7 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -67,6 +67,7 @@ class GuildChannel extends Channel { */ equals(other) { let base = ( + other && this.type === other.type && this.topic === other.topic && this.position === other.position && diff --git a/src/structures/Role.js b/src/structures/Role.js index b244ab8bf..a968c567f 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -22,6 +22,7 @@ class Role { equals(role) { return ( + role && this.id === role.id && this.name === role.name && this.color === role.color && From 8507e349956345950695e310c203427f925b1fd5 Mon Sep 17 00:00:00 2001 From: Hackzzila Date: Thu, 25 Aug 2016 19:43:15 -0500 Subject: [PATCH 193/324] Added fs-extra to the NON devDependencies (cmon hydra) (#545) --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 63ffc7d98..295e786de 100644 --- a/package.json +++ b/package.json @@ -29,10 +29,10 @@ "object.values": "^1.0.3", "superagent": "^1.5.0", "tweetnacl": "^0.14.3", - "ws": "^1.1.1" + "ws": "^1.1.1", + "fs-extra": "^0.30.0" }, "devDependencies": { - "fs-extra": "^0.30.0", "jsdoc-parse": "^1.2.7" }, "optionalDependencies": { From d215e283e69d363554bbdae3b4916e11bbb593e6 Mon Sep 17 00:00:00 2001 From: Hackzzila Date: Fri, 26 Aug 2016 10:16:39 -0500 Subject: [PATCH 194/324] Fixed fs-extra again, hydrapls (#547) --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 63ffc7d98..295e786de 100644 --- a/package.json +++ b/package.json @@ -29,10 +29,10 @@ "object.values": "^1.0.3", "superagent": "^1.5.0", "tweetnacl": "^0.14.3", - "ws": "^1.1.1" + "ws": "^1.1.1", + "fs-extra": "^0.30.0" }, "devDependencies": { - "fs-extra": "^0.30.0", "jsdoc-parse": "^1.2.7" }, "optionalDependencies": { From 3a031c65e78455a00fcc50a91c615f6f9e785bb2 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Fri, 26 Aug 2016 10:17:04 -0500 Subject: [PATCH 195/324] fix issues with line length being greater than 120 (#544) --- src/structures/GuildChannel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 90a08cbf7..aaa7e2660 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -263,7 +263,7 @@ class GuildChannel extends Channel { } /** - * When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object. + * When concatenated with a String, this automatically returns the Channel's name instead of the Channel object. * @returns {String} * @example * // Outputs: Hello from general From 6ddc7a813c081764dc639f8f88231d9be59b2709 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 26 Aug 2016 17:34:23 +0100 Subject: [PATCH 196/324] Add VoiceReceiver streams --- docs/docs.json | 2 +- src/client/voice/VoiceConnection.js | 46 +++++++++++++- src/client/voice/receiver/VoiceReadable.js | 20 ++++++ src/client/voice/receiver/VoiceReceiver.js | 71 ++++++++++++++++++---- src/structures/Message.js | 4 +- test/random.js | 11 +++- 6 files changed, 136 insertions(+), 18 deletions(-) create mode 100644 src/client/voice/receiver/VoiceReadable.js diff --git a/docs/docs.json b/docs/docs.json index 516bb1a0c..47493cb52 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472163123253},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":199,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":11,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[],"properties":[{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":23,"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":47,"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":55,"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":63,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":164,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":182,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":190,"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":25,"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":30,"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":35,"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":46,"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":71,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":138,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]}]},{"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":353,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":379,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":392,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":409,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":423,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":437,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":451,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":465,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":479,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":493,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":222,"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":227,"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":232,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":237,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":247,"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":252,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":262,"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":267,"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":272,"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":277,"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":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":296,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":100,"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.log);"],"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":232,"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.log);"],"meta":{"line":246,"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.log);"],"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":196,"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#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.log);"],"meta":{"line":230,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":259,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":156,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472229268613},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":199,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":220,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":228,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":175,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":353,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":379,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":392,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":409,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":423,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":437,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":451,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":465,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":479,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":493,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":222,"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":227,"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":232,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":237,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":247,"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":252,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":262,"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":267,"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":272,"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":277,"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":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":296,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":100,"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.log);"],"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":232,"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.log);"],"meta":{"line":246,"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.log);"],"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":198,"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#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.log);"],"meta":{"line":232,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":246,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":261,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":156,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index cca32837e..2383fd433 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -57,6 +57,8 @@ class VoiceConnection extends EventEmitter { */ this._reject = reject; this.ssrcMap = new Map(); + this.queue = []; + this.receivers = []; this.bindListeners(); } @@ -139,12 +141,48 @@ class VoiceConnection extends EventEmitter { * Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway) * @event VoiceConnection#ready */ - this.emit('ready'); this._resolve(this); + this.emit('ready'); + }); + this.once('ready', () => { + setImmediate(() => { + for (const item of this.queue) { + this.emit(...item); + } + this.queue = []; + }); }); this.websocket.on('speaking', data => { const guild = this.channel.guild; - this.ssrcMap.set(+data.ssrc, this.manager.client.users.get(data.user_id)); + const user = this.manager.client.users.get(data.user_id); + this.ssrcMap.set(+data.ssrc, user); + if (!data.speaking) { + for (const receiver of this.receivers) { + const opusStream = receiver.opusStreams.get(user.id); + const pcmStream = receiver.pcmStreams.get(user.id); + if (opusStream) { + opusStream.push(null); + opusStream.open = false; + receiver.opusStreams.delete(user.id); + } + if (pcmStream) { + pcmStream.push(null); + pcmStream.open = false; + receiver.pcmStreams.delete(user.id); + } + } + } + /** + * Emitted whenever a user starts/stops speaking + * @event VoiceConnection#speaking + * @param {User} user the user that has started/stopped speaking + * @param {Boolean} speaking whether or not the user is speaking + */ + if (this.ready) { + this.emit('speaking', user, data.speaking); + } else { + this.queue.push(['speaking', user, data.speaking]); + } guild._memberSpeakUpdate(data.user_id, data.speaking); }); } @@ -188,7 +226,9 @@ class VoiceConnection extends EventEmitter { * @returns {VoiceReceiver} */ createReceiver() { - return new VoiceReceiver(this); + const rcv = new VoiceReceiver(this); + this.receivers.push(rcv); + return rcv; } } diff --git a/src/client/voice/receiver/VoiceReadable.js b/src/client/voice/receiver/VoiceReadable.js new file mode 100644 index 000000000..c5bb7e04e --- /dev/null +++ b/src/client/voice/receiver/VoiceReadable.js @@ -0,0 +1,20 @@ +const Readable = require('stream').Readable; + +class VoiceReadable extends Readable { + constructor() { + super(); + this._packets = []; + this.open = true; + } + + _read() { + } + + $push(d) { + if (this.open) { + this.push(d); + } + } +} + +module.exports = VoiceReadable; diff --git a/src/client/voice/receiver/VoiceReceiver.js b/src/client/voice/receiver/VoiceReceiver.js index 33f0f9e34..41f074357 100644 --- a/src/client/voice/receiver/VoiceReceiver.js +++ b/src/client/voice/receiver/VoiceReceiver.js @@ -1,5 +1,6 @@ const EventEmitter = require('events').EventEmitter; const NaCl = require('tweetnacl'); +const Readable = require('./VoiceReadable'); const nonce = new Buffer(24); nonce.fill(0); @@ -16,6 +17,8 @@ class VoiceReceiver extends EventEmitter { so we queue up unknown SSRCs until they become known, then empty the queue. */ this.queues = new Map(); + this.pcmStreams = new Map(); + this.opusStreams = new Map(); /** * The VoiceConnection that instantiated this * @type {VoiceConnection} @@ -29,17 +32,56 @@ class VoiceReceiver extends EventEmitter { this.queues.set(ssrc, []); } this.queues.get(ssrc).push(msg); - } - if (user) { + } else { if (this.queues.get(ssrc)) { this.queues.get(ssrc).push(msg); this.queues.get(ssrc).map(m => this.handlePacket(m, user)); this.queues.delete(ssrc); + return; } + this.handlePacket(msg, user); } }); } + /** + * Creates a readable stream for a user that provides opus data while the user is speaking. When the user + * stops speaking, the stream is destroyed. + * @param {UserResolvable} user the user to create the stream for + * @returns {ReadableStream} + */ + createOpusStream(user) { + user = this.connection.manager.client.resolver.resolveUser(user); + if (!user) { + throw new Error('invalid user object supplied'); + } + if (this.opusStreams.get(user.id)) { + throw new Error('there is already an existing stream for that user!'); + } + const stream = new Readable(); + this.opusStreams.set(user.id, stream); + return stream; + } + + /** + * Creates a readable stream for a user that provides PCM data while the user is speaking. When the user + * stops speaking, the stream is destroyed. The stream is 32-bit signed PCM at 48KHz. + * @param {UserResolvable} user the user to create the stream for + * @returns {ReadableStream} + */ + createPCMStream(user) { + user = this.connection.manager.client.resolver.resolveUser(user); + if (!user) { + throw new Error('invalid user object supplied'); + } + if (this.pcmStreams.get(user.id)) { + throw new Error('there is already an existing stream for that user!'); + } + const stream = new Readable(); + this.pcmStreams.set(user.id, stream); + return stream; + } + handlePacket(msg, user) { msg.copy(nonce, 0, 0, 12); let data = NaCl.secretbox.open(msg.slice(12), nonce, this.connection.data.secret); @@ -58,16 +100,23 @@ class VoiceReceiver extends EventEmitter { * @param {User} user the user that is sending the buffer (is speaking) * @param {Buffer} buffer the opus buffer */ + if (this.opusStreams.get(user.id)) { + this.opusStreams.get(user.id).$push(data); + } this.emit('opus', user, data); - if (this.listenerCount('pcm') > 0) { - /** - * Emits decoded voice data when it's received. For performance reasons, the decoding will only - * happen if there is at least one `pcm` listener on this receiver. - * @event VoiceReceiver#pcm - * @param {User} user the user that is sending the buffer (is speaking) - * @param {Buffer} buffer the decoded buffer - */ - this.emit('pcm', user, this.connection.player.opusEncoder.decode(data)); + if (this.listenerCount('pcm') > 0 || this.pcmStreams.size > 0) { + /** + * Emits decoded voice data when it's received. For performance reasons, the decoding will only + * happen if there is at least one `pcm` listener on this receiver. + * @event VoiceReceiver#pcm + * @param {User} user the user that is sending the buffer (is speaking) + * @param {Buffer} buffer the decoded buffer + */ + const pcm = this.connection.player.opusEncoder.decode(data); + if (this.pcmStreams.get(user.id)) { + this.pcmStreams.get(user.id).$push(pcm); + } + this.emit('pcm', user, pcm); } } } diff --git a/src/structures/Message.js b/src/structures/Message.js index d35909dba..deffe0416 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -121,7 +121,9 @@ class Message { const channMentionsRaw = data.content.match(/<#([0-9]{14,20})>/g) || []; for (const raw of channMentionsRaw) { const chan = this.channel.guild.channels.get(raw.match(/([0-9]{14,20})/g)[0]); - this.mentions.channels.set(chan.id, chan); + if (chan) { + this.mentions.channels.set(chan.id, chan); + } } } } diff --git a/test/random.js b/test/random.js index 7ee7481a4..5a377f1fe 100644 --- a/test/random.js +++ b/test/random.js @@ -2,6 +2,7 @@ const Discord = require('../'); const request = require('superagent'); +const fs = require('fs-extra'); const client = new Discord.Client(); @@ -145,8 +146,14 @@ client.on('message', msg => { conn.player.on('debug', console.log); conn.player.on('error', err => console.log(123, err)); const receiver = conn.createReceiver(); - receiver.on('pcm', u => { - console.log(u.username); + const out = fs.createWriteStream('C:/Users/Amish/Desktop/output.pcm'); + conn.once('speaking', (user, speaking) => { + if (speaking) { + msg.reply(`${user.username} start`); + const str = receiver.createPCMStream(user); + str.pipe(out); + str.on('end', () => msg.reply(`${user.username} end`)); + } }); disp.on('error', err => console.log(123, err)); }) From ee6ccc5e17a648d67d4754d3c8e7edb6dc57b9f1 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 26 Aug 2016 18:05:31 +0100 Subject: [PATCH 197/324] Fix fs-extra dependencies --- docs/custom/ping_pong.js | 2 +- docs/docs.json | 2 +- package.json | 7 +++---- src/client/voice/player/DefaultPlayer.js | 2 +- test/random.js | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/custom/ping_pong.js b/docs/custom/ping_pong.js index 46a341b4d..c6952ad6c 100644 --- a/docs/custom/ping_pong.js +++ b/docs/custom/ping_pong.js @@ -1,4 +1,4 @@ -const fs = require('fs-extra'); +const fs = require('fs'); module.exports = { category: 'Examples', diff --git a/docs/docs.json b/docs/docs.json index 47493cb52..0d4523581 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472229268613},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":199,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":220,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":228,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":175,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":81,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":94,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":99,"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":104,"file":"GroupDMChannel.js","path":"src/structures"},"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":109,"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":114,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":353,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":379,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":392,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":409,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":423,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":437,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":451,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":465,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":479,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":493,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":507,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":222,"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":227,"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":232,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":237,"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":242,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":247,"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":252,"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":257,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":262,"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":267,"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":272,"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":277,"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":282,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":296,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":100,"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.log);"],"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":232,"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.log);"],"meta":{"line":246,"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.log);"],"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":198,"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#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.log);"],"meta":{"line":232,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":246,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":261,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":82,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":96,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":110,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":124,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":138,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":166,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":177,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":199,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":221,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":65,"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":70,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":100,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":180,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":232,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":246,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":260,"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#toString","name":"toString","description":"When concatenated with a String, this automatically concatenates the Channel's name 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":274,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":156,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472231136209},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":220,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":228,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":175,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":198,"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#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.log);"],"meta":{"line":232,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":246,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":261,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/package.json b/package.json index 295e786de..dee11b31c 100644 --- a/package.json +++ b/package.json @@ -26,14 +26,13 @@ }, "homepage": "https://github.com/hydrabolt/discord.js#readme", "dependencies": { - "object.values": "^1.0.3", "superagent": "^1.5.0", "tweetnacl": "^0.14.3", - "ws": "^1.1.1", - "fs-extra": "^0.30.0" + "ws": "^1.1.1" }, "devDependencies": { - "jsdoc-parse": "^1.2.7" + "jsdoc-parse": "^1.2.7", + "fs-extra": "^0.30.0" }, "optionalDependencies": { "node-opus": "^0.1.13" diff --git a/src/client/voice/player/DefaultPlayer.js b/src/client/voice/player/DefaultPlayer.js index 66d832c16..5197f6d20 100644 --- a/src/client/voice/player/DefaultPlayer.js +++ b/src/client/voice/player/DefaultPlayer.js @@ -1,5 +1,5 @@ const BasePlayer = require('./BasePlayer'); -const fs = require('fs-extra'); +const fs = require('fs'); class DefaultPlayer extends BasePlayer { diff --git a/test/random.js b/test/random.js index 5a377f1fe..112550ac9 100644 --- a/test/random.js +++ b/test/random.js @@ -2,7 +2,7 @@ const Discord = require('../'); const request = require('superagent'); -const fs = require('fs-extra'); +const fs = require('fs'); const client = new Discord.Client(); From 0988b47fcd4b523c34986747eb99782d04534039 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 26 Aug 2016 18:49:14 +0100 Subject: [PATCH 198/324] fix the derp --- docs/docs.json | 2 +- src/util/Collection.js | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 0d4523581..e0d1d6d7c 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472231136209},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":220,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":228,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":175,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":198,"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#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.log);"],"meta":{"line":232,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":246,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":261,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":64,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":82,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":52,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472233759660},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":220,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":228,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":175,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":198,"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#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.log);"],"meta":{"line":232,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":246,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":261,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to [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":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/util/Collection.js b/src/util/Collection.js index a281f687d..a97924ee6 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -44,6 +44,21 @@ class Collection extends Map { return arr[Math.floor(Math.random() * arr.length)]; } + /** + * If the items in this collection have a delete method (e.g. messages), invoke + * the delete method. Returns an array of promises + * @return {Array} + */ + deleteAll() { + const returns = []; + for (const item of this.array()) { + if (item.delete) { + returns.push(item.delete()); + } + } + return returns; + } + /** * The length (size) of this collection. * @readonly @@ -105,6 +120,22 @@ class Collection extends Map { _arrayMethod(method, args) { return Array.prototype[method].apply(this.array(), args); } + + /** + * Identical to [Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), + * but returns a Collection instead of an Array. + * @param {Function} callback the callback used to filter + * @param {Object} [thisArg] value to set as this when filtering + * @returns {Collection} + */ + filter(...args) { + const newArray = this.array().filter(...args); + const collection = new Collection(); + for (const item of newArray) { + collection.set(item.id, item); + } + return collection; + } } module.exports = Collection; From e5057a5b6a4e563a2e864497c21215bf861b5c14 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 26 Aug 2016 19:00:50 +0100 Subject: [PATCH 199/324] Add iconURL/avatarURL and fix object.values reference --- docs/docs.json | 2 +- src/index.js | 5 ----- src/structures/Guild.js | 12 ++++++++++++ src/structures/User.js | 13 +++++++++++++ 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index e0d1d6d7c..e64e0b99e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472233759660},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":220,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":228,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":175,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":54,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":198,"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#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.log);"],"meta":{"line":232,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":246,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":261,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":7,"file":"User.js","path":"src/structures"},"methods":[{"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":64,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":72,"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":82,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":20,"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":25,"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":30,"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":35,"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":40,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":49,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":54,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to [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":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472234455086},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":220,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":228,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":175,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":531,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":198,"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#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.log);"],"meta":{"line":232,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":246,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":261,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to [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":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/index.js b/src/index.js index e5f018673..411d7aca6 100644 --- a/src/index.js +++ b/src/index.js @@ -1,8 +1,3 @@ -const values = require('object.values'); const Client = require('./client/Client'); -if (!Object.values) { - values.shim(); -} - exports.Client = Client; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 13409fa16..0a5f6ec9a 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -522,6 +522,18 @@ class Guild { setSplash(splash) { return this.edit({ splash }); } + + /** + * Gets the URL to this guild's icon (if it has one, otherwise it returns null) + * @type {?String} + * @readonly + */ + get iconURL() { + if (!this.icon) { + return null; + } + return Constants.Endpoints.guildIcon(this.id, this.icon); + } } module.exports = Guild; diff --git a/src/structures/User.js b/src/structures/User.js index 0a17abafb..de16f1f8c 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -1,4 +1,5 @@ const TextBasedChannel = require('./interface/TextBasedChannel'); +const Constants = require('../util/Constants'); /** * Represents a User on Discord. @@ -65,6 +66,18 @@ class User { return `<@${this.id}>`; } + /** + * A link to the user's avatar (if they have one, otherwise null) + * @type {?String} + * @readonly + */ + get avatarURL() { + if (!this.avatar) { + return null; + } + return Constants.Endpoints.avatar(this.id, this.avatar); + } + /** * Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful. * @return {Promise} From b22bda74b8e35546d9f0c45e4de83123b3904191 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 26 Aug 2016 21:17:33 +0100 Subject: [PATCH 200/324] Fix ESLint --- docs/docs.json | 2 +- src/util/Collection.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index e64e0b99e..1964d5662 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472234455086},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":220,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":228,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":175,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":531,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":198,"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#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.log);"],"meta":{"line":232,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":246,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":261,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to [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":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472242657648},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":220,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":228,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":175,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":531,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":198,"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#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.log);"],"meta":{"line":232,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":246,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":261,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/util/Collection.js b/src/util/Collection.js index a97924ee6..e1e682be9 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -122,7 +122,8 @@ class Collection extends Map { } /** - * Identical to [Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), + * Identical to + * [Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), * but returns a Collection instead of an Array. * @param {Function} callback the callback used to filter * @param {Object} [thisArg] value to set as this when filtering From 642d768cdc49413bd6270ce8a1f9e34c6dea82e8 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 26 Aug 2016 22:13:23 +0100 Subject: [PATCH 201/324] Add textBasedChannel.bulkDelete() --- docs/docs.json | 2 +- src/client/actions/ActionsManager.js | 1 + src/client/actions/MessageDeleteBulk.js | 33 +++++++++++++++++++ src/client/rest/RESTMethods.js | 14 ++++++++ .../packets/WebSocketPacketManager.js | 1 + .../packets/handlers/MessageDeleteBulk.js | 21 ++++++++++++ src/structures/DMChannel.js | 4 +++ src/structures/GroupDMChannel.js | 4 +++ src/structures/Message.js | 1 + src/structures/TextChannel.js | 4 +++ src/structures/interface/TextBasedChannel.js | 21 +++++++++++- src/util/Constants.js | 4 ++- test/random.js | 4 +++ 13 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 src/client/actions/MessageDeleteBulk.js create mode 100644 src/client/websocket/packets/handlers/MessageDeleteBulk.js diff --git a/docs/docs.json b/docs/docs.json index 1964d5662..4bbbdbed8 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472242657648},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":220,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":228,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":175,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":531,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":198,"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#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.log);"],"meta":{"line":232,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":246,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":261,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":11,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":18,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":25,"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":36,"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":41,"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":46,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":56,"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":61,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":66,"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":71,"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",".<"],["Object",">"]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":81,"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":90,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":99,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"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.log);"],"meta":{"line":28,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":45,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472246007527},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":220,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":228,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":175,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":531,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":199,"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#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.log);"],"meta":{"line":233,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":247,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":262,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index 68112c7d5..ef94f7787 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -6,6 +6,7 @@ class ActionsManager { this.register('MessageCreate'); this.register('MessageDelete'); + this.register('MessageDeleteBulk'); this.register('MessageUpdate'); this.register('ChannelCreate'); this.register('ChannelDelete'); diff --git a/src/client/actions/MessageDeleteBulk.js b/src/client/actions/MessageDeleteBulk.js new file mode 100644 index 000000000..951d3bf73 --- /dev/null +++ b/src/client/actions/MessageDeleteBulk.js @@ -0,0 +1,33 @@ +const Action = require('./Action'); +const Collection = require('../../util/Collection'); +const Constants = require('../../util/Constants'); + +class MessageDeleteBulkAction extends Action { + + constructor(client) { + super(client); + this.timeouts = []; + this.deleted = {}; + } + + handle(data) { + const client = this.client; + const channel = client.channels.get(data.channel_id); + const ids = data.ids; + const messages = new Collection(); + for (const id of ids) { + const message = channel.messages.get(id); + if (message) { + messages.set(message.id, message); + } + } + if (messages.size > 0) { + client.emit(Constants.Events.MESSAGE_BULK_DELETE, messages); + } + return { + messages, + }; + } +} + +module.exports = MessageDeleteBulkAction; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index a28541801..25dff5b32 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -76,6 +76,20 @@ class RESTMethods { }); } + bulkDeleteMessages(channel, messages) { + return new Promise((resolve, reject) => { + const options = { messages }; + this.rest.makeRequest('post', `${Constants.Endpoints.channelMessages(channel.id)}/bulk_delete`, true, options) + .then(() => { + resolve(this.rest.client.actions.MessageDeleteBulk.handle({ + channel_id: channel.id, + ids: messages, + }).messages); + }) + .catch(reject); + }); + } + updateMessage(message, content) { return new Promise((resolve, reject) => { this.rest.makeRequest('patch', Constants.Endpoints.channelMessage(message.channel.id, message.id), true, { diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 31a7bf46b..f9ab37d90 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -37,6 +37,7 @@ class WebSocketPacketManager { this.register(Constants.WSEvents.MESSAGE_DELETE, 'MessageDelete'); this.register(Constants.WSEvents.MESSAGE_UPDATE, 'MessageUpdate'); this.register(Constants.WSEvents.VOICE_SERVER_UPDATE, 'VoiceServerUpdate'); + this.register(Constants.WSEvents.MESSAGE_DELETE_BULK, 'MessageDeleteBulk'); } get client() { diff --git a/src/client/websocket/packets/handlers/MessageDeleteBulk.js b/src/client/websocket/packets/handlers/MessageDeleteBulk.js new file mode 100644 index 000000000..e6d9139ee --- /dev/null +++ b/src/client/websocket/packets/handlers/MessageDeleteBulk.js @@ -0,0 +1,21 @@ +const AbstractHandler = require('./AbstractHandler'); + +class MessageDeleteBulkHandler extends AbstractHandler { + + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; + + client.actions.MessageDeleteBulk.handle(data); + } + +} + +/** +* Emitted whenever a messages are deleted in bulk +* +* @event Client#messageDeleteBulk +* @param {Collection} messages The deleted messages, mapped by their ID +*/ + +module.exports = MessageDeleteBulkHandler; diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 80b55a8e6..66d0ae78a 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -54,6 +54,10 @@ class DMChannel extends Channel { getMessages() { return; } + + bulkDelete() { + return; + } } TextBasedChannel.applyToClass(DMChannel, true); diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index 231ac406b..1687dc21f 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -131,6 +131,10 @@ class GroupDMChannel extends Channel { getMessages() { return; } + + bulkDelete() { + return; + } } TextBasedChannel.applyToClass(GroupDMChannel, true); diff --git a/src/structures/Message.js b/src/structures/Message.js index deffe0416..5da5a9318 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -4,6 +4,7 @@ const Collection = require('../util/Collection'); */ class Message { constructor(channel, data, client) { + this._type = 'message'; /** * The channel that the message was sent in * @type {Channel} diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 3f5b7ce70..c3d482053 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -39,6 +39,10 @@ class TextChannel extends GuildChannel { getMessages() { return; } + + bulkDelete() { + return; + } } TextBasedChannel.applyToClass(TextChannel, true); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index eac890b82..09a67994f 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -14,6 +14,22 @@ class TextBasedChannel { */ this.messages = new Collection(); } + + /** + * Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after. + * @param {Map|Array} messages the messages to delete + * @returns {Collection} + */ + bulkDelete(messages) { + if (messages instanceof Map) { + messages = messages.array(); + } + if (!(messages instanceof Array)) { + return Promise.reject('pass an array or map'); + } + const messageIDs = messages.map(m => m.id); + return this.client.rest.methods.bulkDeleteMessages(this, messageIDs); + } /** * Send a message to this channel * @param {String} content the content to send @@ -72,7 +88,9 @@ class TextBasedChannel { .then(data => { const messages = new Collection(); for (const message of data) { - messages.set(message.id, new Message(this, message, this.client)); + const msg = new Message(this, message, this.client); + messages.set(message.id, msg); + this._cacheMessage(msg); } resolve(messages); }) @@ -106,6 +124,7 @@ exports.applyToClass = (structure, full = false) => { if (full) { props.push('_cacheMessage'); props.push('getMessages'); + props.push('bulkDelete'); } for (const prop of props) { applyProp(structure, prop); diff --git a/src/util/Constants.js b/src/util/Constants.js index 531ec7635..80fcb292b 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -36,7 +36,7 @@ exports.DefaultOptions = { }, }, protocol_version: 6, - max_message_cache: 200, + max_message_cache: 800, rest_ws_bridge_timeout: 5000, api_request_method: 'sequential', shard_id: 0, @@ -160,6 +160,7 @@ exports.Events = { MESSAGE_UPDATE: 'messageUpdate', RECONNECTING: 'reconnecting', GUILD_MEMBER_SPEAKING: 'guildMemberSpeaking', + MESSAGE_BULK_DELETE: 'messageDeleteBulk', }; exports.WSEvents = { @@ -189,6 +190,7 @@ exports.WSEvents = { FRIEND_ADD: 'RELATIONSHIP_ADD', FRIEND_REMOVE: 'RELATIONSHIP_REMOVE', VOICE_SERVER_UPDATE: 'VOICE_SERVER_UPDATE', + MESSAGE_DELETE_BULK: 'MESSAGE_DELETE_BULK', }; const PermissionFlags = exports.PermissionFlags = { diff --git a/test/random.js b/test/random.js index 112550ac9..7a2adaf32 100644 --- a/test/random.js +++ b/test/random.js @@ -12,6 +12,10 @@ client.on('ready', () => { console.log('ready!'); }); +client.on('messageDeleteBulk', msgs => { + msgs.array().map(m => console.log(m.content)); +}); + client.on('message', message => { if (true) { if (message.content === 'makechann') { From b1772089d1fd927f76e4b1d05d841793a5a86639 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 26 Aug 2016 17:57:08 -0400 Subject: [PATCH 202/324] Made GuildChannel.toString return a mention (#543) --- src/structures/GuildChannel.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index aaa7e2660..b8c876f75 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -263,17 +263,17 @@ class GuildChannel extends Channel { } /** - * When concatenated with a String, this automatically returns the Channel's name instead of the Channel object. + * When concatenated with a String, this automatically returns the Channel's mention instead of the Channel object. * @returns {String} * @example - * // Outputs: Hello from general + * // Outputs: Hello from #general * console.log(`Hello from ${channel}`); * @example - * // Outputs: Hello from general - * console.log('Hello from ' + ${channel}); + * // Outputs: Hello from #general + * console.log('Hello from ' + channel); */ toString() { - return this.name; + return `<#${this.id}>`; } } From 947f61e436b0ab06ede01a65362b74000e9852a7 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 26 Aug 2016 23:27:26 +0100 Subject: [PATCH 203/324] Actually fix message.mentions.channels --- docs/docs.json | 2 +- src/structures/Message.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 4bbbdbed8..1e37f6219 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472246007527},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":220,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":228,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":175,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":531,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":199,"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#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.log);"],"meta":{"line":233,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":247,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":262,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472250457381},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":220,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":228,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":175,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":531,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/Message.js b/src/structures/Message.js index 5da5a9318..cb2d06703 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -183,7 +183,9 @@ class Message { const channMentionsRaw = data.content.match(/<#([0-9]{14,20})>/g) || []; for (const raw of channMentionsRaw) { const chan = this.channel.guild.channels.get(raw.match(/([0-9]{14,20})/g)[0]); - this.mentions.channels.set(chan.id, chan); + if (chan) { + this.mentions.channels.set(chan.id, chan); + } } } } From f944dce5c7824bbceca232ca4281fb6590a17078 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 27 Aug 2016 10:22:07 -0400 Subject: [PATCH 204/324] Add client.cacheUser method (#548) * Add client.cacheUser method * Fixed ESLint issues * Added existence check first --- src/client/Client.js | 10 ++++++++++ src/client/actions/ActionsManager.js | 1 + src/client/actions/UserGet.js | 15 +++++++++++++++ src/client/rest/RESTMethods.js | 10 ++++++++++ src/util/Constants.js | 11 +++++++---- 5 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 src/client/actions/UserGet.js diff --git a/src/client/Client.js b/src/client/Client.js index f08446265..c9567f3fe 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -135,6 +135,16 @@ class Client extends EventEmitter { return this.rest.methods.loginToken(email); } + /** + * Forces a user to be cached. + * @param {String} id The ID of the user to cache + * @return {Promise} + */ + cacheUser(id) { + if (this.users.has(id)) return Promise.resolve(this.users.get(id)); + return this.rest.methods.getUser(id); + } + /** * Returns a Collection, mapping Guild ID to Voice Connections. * @readonly diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index ef94f7787..42605be56 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -17,6 +17,7 @@ class ActionsManager { this.register('GuildRoleCreate'); this.register('GuildRoleDelete'); this.register('GuildRoleUpdate'); + this.register('UserGet'); this.register('UserUpdate'); } diff --git a/src/client/actions/UserGet.js b/src/client/actions/UserGet.js new file mode 100644 index 000000000..435d046a5 --- /dev/null +++ b/src/client/actions/UserGet.js @@ -0,0 +1,15 @@ +const Action = require('./Action'); + +class UserGetAction extends Action { + + handle(data) { + const client = this.client; + const user = client.dataManager.newUser(data); + + return { + user, + }; + } +} + +module.exports = UserGetAction; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 25dff5b32..0a53d07c0 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -193,6 +193,16 @@ class RESTMethods { }); } + getUser(userID) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.user(userID), true) + .then((data) => { + resolve(this.rest.client.actions.UserGet.handle(data).user); + }) + .catch(reject); + }); + } + updateCurrentUser(_data) { return new Promise((resolve, reject) => { const user = this.rest.client.user; diff --git a/src/util/Constants.js b/src/util/Constants.js index 80fcb292b..8cf7358a8 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -75,12 +75,15 @@ const Endpoints = exports.Endpoints = { // general endpoints login: `${API}/auth/login`, logout: `${API}/auth/logout`, + gateway: `${API}/gateway`, + invite: (id) => `${API}/invite/${id}`, + + // users + user: (userID) => `${API}/users/${userID}`, + userChannels: (userID) => `${Endpoints.user(userID)}/channels`, + avatar: (userID, avatar) => `${Endpoints.user(userID)}/avatars/${avatar}.jpg`, me: `${API}/users/@me`, meGuild: (guildID) => `${Endpoints.me}/guilds/${guildID}`, - gateway: `${API}/gateway`, - userChannels: (userID) => `${API}/users/${userID}/channels`, - avatar: (userID, avatar) => `${API}/users/${userID}/avatars/${avatar}.jpg`, - invite: (id) => `${API}/invite/${id}`, // guilds guilds: `${API}/guilds`, From 19d976748c2dd33ea6d038b4c174a093e3331a75 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 27 Aug 2016 15:35:45 +0100 Subject: [PATCH 205/324] VoiceReadable stream now ends when a member leaves a VoiceChannel --- docs/docs.json | 2 +- src/client/voice/VoiceConnection.js | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 1e37f6219..f0c7b27f9 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472250457381},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":220,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":228,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":175,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":531,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#toString","name":"toString","description":"When concatenated with a String, this automatically returns the Channel's name 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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472308554837},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":247,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":531,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 2383fd433..f8a582d86 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -152,6 +152,25 @@ class VoiceConnection extends EventEmitter { this.queue = []; }); }); + this.manager.client.on(Constants.Events.VOICE_STATE_UPDATE, (oldM, newM) => { + if (oldM.voiceChannel && oldM.voiceChannel.guild.id === this.channel.guild.id && !newM.voiceChannel) { + const user = newM.user; + for (const receiver of this.receivers) { + const opusStream = receiver.opusStreams.get(user.id); + const pcmStream = receiver.pcmStreams.get(user.id); + if (opusStream) { + opusStream.push(null); + opusStream.open = false; + receiver.opusStreams.delete(user.id); + } + if (pcmStream) { + pcmStream.push(null); + pcmStream.open = false; + receiver.pcmStreams.delete(user.id); + } + } + } + }); this.websocket.on('speaking', data => { const guild = this.channel.guild; const user = this.manager.client.users.get(data.user_id); From f2708dd26f3de6536a6f99c9751d8c779544e6e4 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 27 Aug 2016 15:48:05 +0100 Subject: [PATCH 206/324] Add playPCMStream --- docs/docs.json | 2 +- src/client/voice/VoiceConnection.js | 11 +++++++++++ src/client/voice/player/DefaultPlayer.js | 1 - 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index f0c7b27f9..a5c2bc113 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472308554837},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":143,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"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":247,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":531,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472309290531},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#cacheUser","name":"cacheUser","description":"Forces a user to be cached.","memberof":"Client","meta":{"line":143,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to cache","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":153,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":531,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index f8a582d86..a84bc89ad 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -240,6 +240,17 @@ class VoiceConnection extends EventEmitter { return this.player.playStream(stream); } + /** + * Plays a stream of PCM data + * @param {ReadableStream} pcmStream the PCM stream + * @returns {StreamDispatcher} + */ + playPCMStream(pcmStream) { + this._shutdown(); + const dispatcher = this.player.playPCMStream(pcmStream); + return dispatcher; + } + /** * Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these. * @returns {VoiceReceiver} diff --git a/src/client/voice/player/DefaultPlayer.js b/src/client/voice/player/DefaultPlayer.js index 5197f6d20..2f0d64887 100644 --- a/src/client/voice/player/DefaultPlayer.js +++ b/src/client/voice/player/DefaultPlayer.js @@ -14,7 +14,6 @@ class DefaultPlayer extends BasePlayer { const dispatcher = this.playPCMStream(pcmStream); return dispatcher; } - } module.exports = DefaultPlayer; From 50c6fa3433715e3e4b831d18f0d18d0f389a5bf9 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 27 Aug 2016 17:46:08 +0100 Subject: [PATCH 207/324] Role hex stuff --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 4 ++++ src/structures/Role.js | 17 +++++++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index a5c2bc113..26eddbf71 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472309290531},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#cacheUser","name":"cacheUser","description":"Forces a user to be cached.","memberof":"Client","meta":{"line":143,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to cache","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":153,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":531,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"color","description":"the new color for the role","type":{"types":[[["Number",""]]]}}]},{"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472316373252},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#cacheUser","name":"cacheUser","description":"Forces a user to be cached.","memberof":"Client","meta":{"line":143,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to cache","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":153,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":531,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 0a53d07c0..e22feb604 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -354,6 +354,10 @@ class RESTMethods { data.position = _data.position || role.position; data.color = _data.color || role.color; + if (data.color.startsWith('#')) { + data.color = parseInt(data.color.replace('#', ''), 16); + } + if (typeof _data.hoist !== 'undefined') { data.hoist = _data.hoist; } else { diff --git a/src/structures/Role.js b/src/structures/Role.js index a968c567f..eab7af139 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -114,11 +114,11 @@ class Role { /** * Set a new color for the role - * @param {Number} color the new color for the role + * @param {Number|String} color the new color for the role, either a hex string or a base 10 number * @returns {Promise} * @example * // set the color of a role - * role.setColor(parseInt('FF0000', 16)) + * role.setColor('#FF0000') * .then(r => console.log(`Set color of role ${r}`)) * .catch(console.log); */ @@ -222,6 +222,19 @@ class Role { toString() { return `<@&${this.id}>`; } + + /** + * The hexadecimal version of the role color, with a leading hashtag. + * @type {String} + * @readonly + */ + get hexColor() { + let col = (this.color).toString(16); + while (col.length < 6) { + col = `0${col}`; + } + return `#${col}`; + } } module.exports = Role; From 8a1bfe559de2e530e7fa88370de1e8dfa77d8a43 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 27 Aug 2016 17:54:53 +0100 Subject: [PATCH 208/324] Add guildmember nickname tracking --- docs/docs.json | 2 +- src/structures/Guild.js | 14 ++++++++------ src/structures/GuildMember.js | 1 + src/util/Constants.js | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 26eddbf71..77f5c3e79 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472316373252},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#cacheUser","name":"cacheUser","description":"Forces a user to be cached.","memberof":"Client","meta":{"line":143,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to cache","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":153,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberRolesUpdate","name":"guildMemberRolesUpdate","description":"Emitted whenever a Guild Member's Roles change - i.e. new role or removed role","memberof":"Client","meta":{"line":104,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"the guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldRoles","description":"the roles before the update","type":{"types":[[["Array",".<"],["Role",">"]]]}},{"name":"newRoles","description":"the roles after the update","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":200,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":25,"file":"Guild.js","path":"src/structures"},"methods":[{"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":130,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":144,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":156,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":167,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":424,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":438,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":452,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":466,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":508,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":31,"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":37,"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":43,"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":49,"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":60,"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":65,"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":223,"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":228,"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":233,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":238,"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":243,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":248,"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":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":263,"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":268,"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":273,"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":278,"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":283,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":297,"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":531,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":138,"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":146,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":80,"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":103,"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":112,"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":121,"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":130,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472316898397},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#cacheUser","name":"cacheUser","description":"Forces a user to be cached.","memberof":"Client","meta":{"line":143,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to cache","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":153,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":106,"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":202,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":146,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":158,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":169,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":356,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":510,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":524,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":225,"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":230,"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":235,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":240,"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":245,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":250,"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":255,"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":260,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":265,"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":270,"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":275,"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":280,"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":285,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":299,"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":533,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":139,"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":147,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 0a5f6ec9a..e655a1435 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -1,6 +1,7 @@ const User = require('./User'); const GuildMember = require('./GuildMember'); const Constants = require('../util/Constants'); +const cloneObject = require('../util/CloneObject'); const Role = require('./Role'); const Collection = require('../util/Collection'); @@ -97,19 +98,20 @@ class Guild { } _updateMember(member, data) { - const oldRoles = member.roles; + const oldMember = cloneObject(member); member._roles = data.roles; + member.nickname = data.nick; if (this.client.ws.status === Constants.Status.READY) { /** - * Emitted whenever a Guild Member's Roles change - i.e. new role or removed role + * Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname * - * @event Client#guildMemberRolesUpdate + * @event Client#guildMemberUpdate * @param {Guild} guild the guild that the update affects - * @param {Array} oldRoles the roles before the update - * @param {Guild} newRoles the roles after the update + * @param {GuildMember} oldMember the member before the update + * @param {GuildMember} newMember the member after the update */ - this.client.emit(Constants.Events.GUILD_MEMBER_ROLES_UPDATE, this, oldRoles, member.roles); + this.client.emit(Constants.Events.GUILD_MEMBER_UPDATE, this, oldMember, member); } } diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 4ebb583c5..5e9b2e51c 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -69,6 +69,7 @@ class GuildMember { * @type {?Boolean} */ this.speaking = this.speaking; + this.nickname = data.nick; this._roles = data.roles; } diff --git a/src/util/Constants.js b/src/util/Constants.js index 8cf7358a8..8f52cffe8 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -143,7 +143,7 @@ exports.Events = { GUILD_BAN_REMOVE: 'guildBanRemove', GUILD_MEMBER_ADD: 'guildMemberAdd', GUILD_MEMBER_REMOVE: 'guildMemberRemove', - GUILD_MEMBER_ROLES_UPDATE: 'guildMemberRolesUpdate', + GUILD_MEMBER_UPDATE: 'guildMemberUpdate', GUILD_ROLE_CREATE: 'guildRoleCreate', GUILD_ROLE_DELETE: 'guildRoleDelete', GUILD_ROLE_UPDATE: 'guildRoleUpdate', From 6293f28ad998553f5dca2e0998e06b201c293ab5 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 27 Aug 2016 18:55:03 +0100 Subject: [PATCH 209/324] Add guild member nickname setting n stuff --- .eslintrc.js | 1 + docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 27 +++++++++++++++++ src/structures/Guild.js | 19 ++++++++++-- src/structures/GuildMember.js | 54 ++++++++++++++++++++++++++++++++++ src/util/Constants.js | 1 + 6 files changed, 100 insertions(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 8cb2d59b1..e67102ed4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -15,5 +15,6 @@ module.exports = { "consistent-return": 0, "import/no-extraneous-dependencies": 0, "no-continue": 0, + "no-confusing-arrow" : 0 } }; \ No newline at end of file diff --git a/docs/docs.json b/docs/docs.json index 77f5c3e79..f374ac1d2 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472316898397},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#cacheUser","name":"cacheUser","description":"Forces a user to be cached.","memberof":"Client","meta":{"line":143,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to cache","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":153,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":106,"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":202,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":132,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":146,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":158,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":169,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":356,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":426,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":440,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":454,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":468,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":482,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":496,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":510,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":524,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":225,"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":230,"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":235,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":240,"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":245,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":250,"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":255,"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":260,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":265,"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":270,"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":275,"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":280,"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":285,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":299,"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":533,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":139,"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":147,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472320508171},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#cacheUser","name":"cacheUser","description":"Forces a user to be cached.","memberof":"Client","meta":{"line":143,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to cache","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":153,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":546,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index e22feb604..4e64bf923 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -1,8 +1,10 @@ const Constants = require('../../util/Constants'); +const Collection = require('../../util/Constants'); const getStructure = name => require(`../../structures/${name}`); const User = getStructure('User'); const GuildMember = getStructure('GuildMember'); +const Role = getStructure('Role'); class RESTMethods { constructor(restManager) { @@ -341,6 +343,31 @@ class RESTMethods { }); } + updateGuildMember(member, data) { + return new Promise((resolve, reject) => { + if (data.channel) { + data.channel_id = this.client.resolver.resolveChannel(data.channel).id; + } + if (data.roles) { + if (data.roles instanceof Map) { + data.roles = data.roles.array(); + } + data.roles = data.roles.map(role => role instanceof Role ? role.id : role); + } + + let endpoint = Constants.Endpoints.guildMember(member.guild.id, member.id); + // fix your endpoints, discord ;-; + if (member.id === this.rest.client.user.id) { + if (Object.keys(data).length === 1 && Object.keys(data)[0] === 'nick') { + endpoint = Constants.Endpoints.stupidInconsistentGuildEndpoint(member.guild.id); + } + } + this.rest.makeRequest('patch', endpoint, true, data) + .then(resData => resolve(member.guild._updateMember(member, resData).mem)) + .catch(reject); + }); + } + updateGuildRole(role, _data) { return new Promise((resolve, reject) => { /* diff --git a/src/structures/Guild.js b/src/structures/Guild.js index e655a1435..14e2b9314 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -100,9 +100,18 @@ class Guild { _updateMember(member, data) { const oldMember = cloneObject(member); - member._roles = data.roles; - member.nickname = data.nick; - if (this.client.ws.status === Constants.Status.READY) { + if (data.roles) { + member._roles = data.roles; + } else { + member.nickname = data.nick; + } + + const notSame = ( + member.nickname !== oldMember.nickname && + !arraysEqual(member._roles, oldMember._roles) + ); + + if (this.client.ws.status === Constants.Status.READY && notSame) { /** * Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname * @@ -113,6 +122,10 @@ class Guild { */ this.client.emit(Constants.Events.GUILD_MEMBER_UPDATE, this, oldMember, member); } + return { + old: oldMember, + mem: member, + }; } _removeMember(guildMember) { diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 5e9b2e51c..0b7bc2927 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -132,6 +132,60 @@ class GuildMember { return this.user.id; } + /** + * Mute/unmute a user + * @param {Boolean} mute whether or not the member should be muted + * @returns {Promise} + */ + setMute(mute) { + return this.edit({ mute }); + } + + /** + * Deafen/undeafen a user + * @param {Boolean} deaf whether or not the member should be deafened + * @returns {Promise} + */ + setDeaf(deaf) { + return this.edit({ deaf }); + } + + /** + * Moves the Guild Member to the given channel. + * @param {ChannelResolvable} channel the channel to move the member to + * @returns {Promise} + */ + setVoiceChannel(channel) { + return this.edit({ channel }); + } + + /** + * Sets the Roles applied to the member. + * @param {Collection|Array} roles the roles to apply + * @returns {Promise} + */ + setRoles(roles) { + return this.edit({ roles }); + } + + /** + * Set the nickname for the Guild Member + * @param {String} nick the nickname for the Guild Member + * @returns {Promise} + */ + setNickname(nick) { + return this.edit({ nick }); + } + + /** + * Edit a Guild Member + * @param {GuildmemberEditData} data the data to edit the member with + * @returns {Promise} + */ + edit(data) { + return this.client.rest.methods.updateGuildMember(this, data); + } + /** * Deletes any DM's with this Guild Member * @returns {Promise} diff --git a/src/util/Constants.js b/src/util/Constants.js index 8f52cffe8..47f5c3772 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -98,6 +98,7 @@ const Endpoints = exports.Endpoints = { guildIntegrations: (guildID) => `${Endpoints.guild(guildID)}/integrations`, guildMembers: (guildID) => `${Endpoints.guild(guildID)}/members`, guildMember: (guildID, memberID) => `${Endpoints.guildMembers(guildID)}/${memberID}`, + stupidInconsistentGuildEndpoint: (guildID) => `${Endpoints.guildMember(guildID, '@me')}/nick`, guildChannels: (guildID) => `${Endpoints.guild(guildID)}/channels`, // channels From 135ab021049e8f3228e77f965e18bb6d8a2babd2 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 27 Aug 2016 18:55:15 +0100 Subject: [PATCH 210/324] fix eslint --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index f374ac1d2..9263092ec 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472320508171},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#cacheUser","name":"cacheUser","description":"Forces a user to be cached.","memberof":"Client","meta":{"line":143,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to cache","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":153,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":546,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472320520329},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#cacheUser","name":"cacheUser","description":"Forces a user to be cached.","memberof":"Client","meta":{"line":143,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to cache","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":153,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":546,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 4e64bf923..931a48067 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -1,5 +1,4 @@ const Constants = require('../../util/Constants'); -const Collection = require('../../util/Constants'); const getStructure = name => require(`../../structures/${name}`); const User = getStructure('User'); From 7ae12ab325e2ca1533f0b33af7893a73d746ddec Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 27 Aug 2016 14:28:18 -0400 Subject: [PATCH 211/324] Rename client.cacheUser to client.fetchUser (#551) --- src/client/Client.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index c9567f3fe..fe1b11cac 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -136,11 +136,11 @@ class Client extends EventEmitter { } /** - * Forces a user to be cached. - * @param {String} id The ID of the user to cache + * Caches a user, or obtains it from the cache if it's already cached + * @param {String} id The ID of the user to obtain * @return {Promise} */ - cacheUser(id) { + fetchUser(id) { if (this.users.has(id)) return Promise.resolve(this.users.get(id)); return this.rest.methods.getUser(id); } From 9ea9623de05e55f7801781aa9c5f39ea3a650e76 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 27 Aug 2016 19:40:09 +0100 Subject: [PATCH 212/324] Add Permission Overwrites deletion --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 9 +++++++++ src/structures/PermissionOverwrites.js | 8 ++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 9263092ec..0cfe463ec 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472320520329},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#cacheUser","name":"cacheUser","description":"Forces a user to be cached.","memberof":"Client","meta":{"line":143,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to cache","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":153,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":546,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":[],"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472323214422},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#cacheUser","name":"cacheUser","description":"Forces a user to be cached.","memberof":"Client","meta":{"line":143,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to cache","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":153,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":546,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 931a48067..1d58140e6 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -317,6 +317,15 @@ class RESTMethods { }); } + deletePermissionOverwrites(overwrite) { + return new Promise((resolve, reject) => { + const endpoint = `${Constants.Endpoints.channelPermissions(overwrite.channel.id)}/${overwrite.id}`; + this.rest.makeRequest('del', endpoint, true) + .then(() => resolve(overwrite)) + .catch(reject); + }); + } + getChannelMessages(channel, payload = {}) { return new Promise((resolve, reject) => { const params = []; diff --git a/src/structures/PermissionOverwrites.js b/src/structures/PermissionOverwrites.js index 24851a96c..665df7b31 100644 --- a/src/structures/PermissionOverwrites.js +++ b/src/structures/PermissionOverwrites.js @@ -27,6 +27,14 @@ class PermissionOverwrites { this.denyData = data.deny; this.allowData = data.allow; } + + /** + * Delete this Permission Overwrite. + * @returns {Promise} + */ + delete() { + return this.channel.client.rest.methods.deletePermissionOverwrites(this); + } } module.exports = PermissionOverwrites; From 6faa409e9689a7c5d6ce9a86932a9621b7fd7d18 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 27 Aug 2016 15:22:08 -0400 Subject: [PATCH 213/324] Add note about requiring bot accounts (#552) --- src/client/Client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/Client.js b/src/client/Client.js index fe1b11cac..414efa206 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -136,7 +136,8 @@ class Client extends EventEmitter { } /** - * Caches a user, or obtains it from the cache if it's already cached + * Caches a user, or obtains it from the cache if it's already cached. + * If the user isn't already cached, it will only be obtainable by OAuth bot accounts. * @param {String} id The ID of the user to obtain * @return {Promise} */ From 6a1a36813ffbd6fdde1bd1d33b0f5ce40b66fa37 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 27 Aug 2016 21:43:58 +0100 Subject: [PATCH 214/324] Add TextBasedChannel.setTyping(bool) --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 8 +++++++ src/structures/ClientUser.js | 2 ++ src/structures/DMChannel.js | 4 ++++ src/structures/GroupDMChannel.js | 4 ++++ src/structures/TextChannel.js | 4 ++++ src/structures/interface/TextBasedChannel.js | 23 ++++++++++++++++++++ 7 files changed, 46 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 0cfe463ec..a69a8c3a8 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472323214422},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#cacheUser","name":"cacheUser","description":"Forces a user to be cached.","memberof":"Client","meta":{"line":143,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to cache","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":153,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":34,"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.log);"],"meta":{"line":49,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":64,"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.log);"],"meta":{"line":78,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":93,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":546,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472330648456},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":546,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 1d58140e6..e21ca3779 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -376,6 +376,14 @@ class RESTMethods { }); } + sendTyping(channelID) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('post', `${Constants.Endpoints.channel(channelID)}/typing`, true) + .then(resolve) + .catch(reject); + }); + } + updateGuildRole(role, _data) { return new Promise((resolve, reject) => { /* diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 53f430c9e..ec980d487 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -17,6 +17,8 @@ class ClientUser extends User { * @type {String} */ this.email = data.email; + + this._typing = new Map(); } /** diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 66d0ae78a..26b81dee2 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -58,6 +58,10 @@ class DMChannel extends Channel { bulkDelete() { return; } + + setTyping() { + return; + } } TextBasedChannel.applyToClass(DMChannel, true); diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index 1687dc21f..665be0dbe 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -135,6 +135,10 @@ class GroupDMChannel extends Channel { bulkDelete() { return; } + + setTyping() { + return; + } } TextBasedChannel.applyToClass(GroupDMChannel, true); diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index c3d482053..a956aac3b 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -43,6 +43,10 @@ class TextChannel extends GuildChannel { bulkDelete() { return; } + + setTyping() { + return; + } } TextBasedChannel.applyToClass(TextChannel, true); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 09a67994f..a330440ac 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -98,6 +98,28 @@ class TextBasedChannel { }); } + /** + * Starts or stops a typing indicator in the channel. + * It can take a few seconds for the Client User to stop typing. + * @param {Boolean} typing whether or not the client user should be typing + * @returns {null} + * @example + * // start typing in a channel + * channel.setTyping(true); + * @example + * // stop typing in a channel + * channel.setTyping(false); + */ + setTyping(typing) { + clearInterval(this.client.user._typing.get(this.id)); + if (typing) { + this.client.user._typing.set(this.id, setInterval(() => { + this.client.rest.methods.sendTyping(this.id); + }, 4000)); + this.client.rest.methods.sendTyping(this.id); + } + } + _cacheMessage(message) { const maxSize = this.client.options.max_message_cache; if (maxSize === 0) { @@ -125,6 +147,7 @@ exports.applyToClass = (structure, full = false) => { props.push('_cacheMessage'); props.push('getMessages'); props.push('bulkDelete'); + props.push('setTyping'); } for (const prop of props) { applyProp(structure, prop); From 4d6c6043225797026b95bc76b669d9b14f2908d6 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 27 Aug 2016 21:59:29 +0100 Subject: [PATCH 215/324] Added GuildMember.ban() --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 11 +++++++++++ src/structures/GuildMember.js | 13 +++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index a69a8c3a8..fd119dfb1 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472330648456},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":546,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472331574838},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":546,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index e21ca3779..81c2c3e66 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -384,6 +384,17 @@ class RESTMethods { }); } + banGuildMember(member, deleteDays) { + return new Promise((resolve, reject) => { + const data = { + 'delete-message-days': deleteDays, + }; + this.rest.makeRequest('put', `${Constants.Endpoints.guildBans(member.guild.id)}/${member.id}`, true, data) + .then(() => resolve(member)) + .catch(reject); + }); + } + updateGuildRole(role, _data) { return new Promise((resolve, reject) => { /* diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 0b7bc2927..5da424e5f 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -202,6 +202,19 @@ class GuildMember { return this.client.rest.methods.kickGuildMember(this.guild, this); } + /** + * Ban this Guild Member + * @param {number} [deleteDays=0] The amount of days worth of messages from this member that should + * also be deleted. Between `0` and `7`. + * @returns {Promise} + * @example + * // ban a guild member + * guildMember.ban(7); + */ + ban(deleteDays = 0) { + return this.client.rest.methods.banGuildMember(this, deleteDays); + } + sendMessage() { return; } From 2c056b64186c76434a41cf8728791f55be8aa546 Mon Sep 17 00:00:00 2001 From: Hackzzila Date: Sat, 27 Aug 2016 16:01:51 -0500 Subject: [PATCH 216/324] Added nonce support to sendMessage (#553) --- src/structures/interface/TextBasedChannel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index a330440ac..099bc9012 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -42,7 +42,7 @@ class TextBasedChannel { * .catch(console.log); */ sendMessage(content, options = {}) { - return this.client.rest.methods.sendMessage(this, content, options.tts); + return this.client.rest.methods.sendMessage(this, content, options.tts, options.nonce); } /** * Send a text-to-speech message to this channel From 22062f1f867612c8cf1ba12ec5f42c8c30c03955 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 27 Aug 2016 22:31:14 +0100 Subject: [PATCH 217/324] Added guild.unban --- docs/docs.json | 2 +- src/client/actions/ActionsManager.js | 1 + src/client/actions/GuildBanRemove.js | 18 ++++++++++++++++ src/client/rest/RESTMethods.js | 21 ++++++++++++++++++- .../packets/handlers/GuildBanRemove.js | 9 +------- src/structures/Guild.js | 14 +++++++++++++ 6 files changed, 55 insertions(+), 10 deletions(-) create mode 100644 src/client/actions/GuildBanRemove.js diff --git a/docs/docs.json b/docs/docs.json index fd119dfb1..41eac6656 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472331574838},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":23,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":546,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472333480794},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index 42605be56..378136598 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -14,6 +14,7 @@ class ActionsManager { this.register('GuildDelete'); this.register('GuildUpdate'); this.register('GuildMemberRemove'); + this.register('GuildBanRemove'); this.register('GuildRoleCreate'); this.register('GuildRoleDelete'); this.register('GuildRoleUpdate'); diff --git a/src/client/actions/GuildBanRemove.js b/src/client/actions/GuildBanRemove.js new file mode 100644 index 000000000..e0204ba90 --- /dev/null +++ b/src/client/actions/GuildBanRemove.js @@ -0,0 +1,18 @@ +const Action = require('./Action'); +const Constants = require('../../util/Constants'); + +class GuildBanRemove extends Action { + + handle(data) { + const client = this.client; + + const guild = client.guilds.get(data.guild_id); + const user = client.dataManager.newUser(data.user); + + if (guild && user) { + client.emit(Constants.Events.GUILD_BAN_REMOVE, guild, user); + } + } +} + +module.exports = GuildBanRemove; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 81c2c3e66..ecb2bd430 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -354,7 +354,7 @@ class RESTMethods { updateGuildMember(member, data) { return new Promise((resolve, reject) => { if (data.channel) { - data.channel_id = this.client.resolver.resolveChannel(data.channel).id; + data.channel_id = this.rest.client.resolver.resolveChannel(data.channel).id; } if (data.roles) { if (data.roles instanceof Map) { @@ -395,6 +395,25 @@ class RESTMethods { }); } + unbanGuildMember(guild, member) { + return new Promise((resolve, reject) => { + member = this.rest.client.resolver.resolveUser(member); + if (!member) { + throw new Error('cannot unban a user that is not a user resolvable'); + } + const listener = (eGuild, eUser) => { + if (guild.id === guild.id && member.id === eUser.id) { + this.rest.client.removeListener(Constants.Events.GUILD_BAN_REMOVE, listener); + resolve(eUser); + } + }; + this.rest.client.on(Constants.Events.GUILD_BAN_REMOVE, listener); + this.rest.makeRequest('del', `${Constants.Endpoints.guildBans(guild.id)}/${member.id}`, true) + .then(() => {}) + .catch(reject); + }); + } + updateGuildRole(role, _data) { return new Promise((resolve, reject) => { /* diff --git a/src/client/websocket/packets/handlers/GuildBanRemove.js b/src/client/websocket/packets/handlers/GuildBanRemove.js index 3852e84ad..18aba54b4 100644 --- a/src/client/websocket/packets/handlers/GuildBanRemove.js +++ b/src/client/websocket/packets/handlers/GuildBanRemove.js @@ -2,20 +2,13 @@ const AbstractHandler = require('./AbstractHandler'); -const Constants = require('../../../../util/Constants'); - class GuildBanRemoveHandler extends AbstractHandler { handle(packet) { const data = packet.d; const client = this.packetManager.client; - const guild = client.guilds.get(data.guild_id); - const user = client.users.get(data.user.id); - - if (guild && user) { - client.emit(Constants.Events.GUILD_BAN_REMOVE, guild, user); - } + client.actions.GuildBanRemove.handle(data); } } diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 14e2b9314..f152c7145 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -538,6 +538,20 @@ class Guild { return this.edit({ splash }); } + /** + * Unbans a member from the Guild + * @param {UserResolvable} member the member to unban + * @returns {Promise} + * @example + * // unban a member + * guild.unban('123123123123') + * .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`)) + * .catch(reject); + */ + unban(member) { + return this.client.rest.methods.unbanGuildMember(this, member); + } + /** * Gets the URL to this guild's icon (if it has one, otherwise it returns null) * @type {?String} From ef0f38930f522b53099303a573ae5d81298bfed7 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 27 Aug 2016 22:48:43 +0100 Subject: [PATCH 218/324] Added Guild.fetchBans() --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 16 ++++++++++++++++ src/structures/Guild.js | 8 ++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 41eac6656..32fb30a00 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472333480794},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472334528033},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["String",", "],["User",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":568,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index ecb2bd430..353bf35c7 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -1,4 +1,5 @@ const Constants = require('../../util/Constants'); +const Collection = require('../../util/Collection'); const getStructure = name => require(`../../structures/${name}`); const User = getStructure('User'); @@ -414,6 +415,21 @@ class RESTMethods { }); } + getGuildBans(guild) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.guildBans(guild.id), true) + .then(banItems => { + const bannedUsers = new Collection(); + for (const banItem of banItems) { + const user = this.rest.client.dataManager.newUser(banItem.user); + bannedUsers.set(user.id, user); + } + resolve(bannedUsers); + }) + .catch(reject); + }); + } + updateGuildRole(role, _data) { return new Promise((resolve, reject) => { /* diff --git a/src/structures/Guild.js b/src/structures/Guild.js index f152c7145..b3b327d4f 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -552,6 +552,14 @@ class Guild { return this.client.rest.methods.unbanGuildMember(this, member); } + /** + * Fetch a Collection of banned users in this Guild. + * @returns {Promise} + */ + fetchBans() { + return this.client.rest.methods.getGuildBans(this); + } + /** * Gets the URL to this guild's icon (if it has one, otherwise it returns null) * @type {?String} From 948a18dfe239c2075ca2b262431b03f730b8b00d Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 27 Aug 2016 22:52:16 +0100 Subject: [PATCH 219/324] Fix docs.json --- docs/docs.json | 2 +- src/structures/Guild.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 32fb30a00..83ef38780 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472334528033},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["String",", "],["User",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":568,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472334741481},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":568,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index b3b327d4f..199b26724 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -554,7 +554,7 @@ class Guild { /** * Fetch a Collection of banned users in this Guild. - * @returns {Promise} + * @returns {Promise, Error>} */ fetchBans() { return this.client.rest.methods.getGuildBans(this); From 83b33c50460d1244792053ec05cc38fc452c76ba Mon Sep 17 00:00:00 2001 From: Hackzzila Date: Sat, 27 Aug 2016 17:06:14 -0500 Subject: [PATCH 220/324] Added MessageOptions to the docs and added an options param to sendTTSMessage (#555) * Added MessageOptions to the docs and added an options param to sendTTSMessage * Docs --- docs/docs.json | 2 +- src/structures/interface/TextBasedChannel.js | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 83ef38780..4786dcf36 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472334741481},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":568,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":44,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":61,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472335359735},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":568,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 099bc9012..fbfda5c86 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -30,6 +30,16 @@ class TextBasedChannel { const messageIDs = messages.map(m => m.id); return this.client.rest.methods.bulkDeleteMessages(this, messageIDs); } + /** + * Options that can be passed into sendMessage or sendTTSMessage: + * ```js + * { + * tts: false, + * nonce: '', + * }; + * ``` + * @typedef {Object} MessageOptions + */ /** * Send a message to this channel * @param {String} content the content to send @@ -47,6 +57,7 @@ class TextBasedChannel { /** * Send a text-to-speech message to this channel * @param {String} content the content to send + * @param {MessageOptions} [options={}] the options to provide * @returns {Promise} * @example * // send a TTS message @@ -54,8 +65,8 @@ class TextBasedChannel { * .then(message => console.log(`Sent tts message: ${message.content}`)) * .catch(console.log); */ - sendTTSMessage(content) { - return this.client.rest.methods.sendMessage(this, content, true); + sendTTSMessage(content, options = {}) { + return this.client.rest.methods.sendMessage(this, content, true, options.nonce); } /** From a959cd339cbe8e3e918f98c03869670a032e2280 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 27 Aug 2016 23:15:16 +0100 Subject: [PATCH 221/324] Fix inaccuracy in VoiceReceiver docs --- docs/docs.json | 2 +- src/client/voice/receiver/VoiceReceiver.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 4786dcf36..0dc3fb3a1 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472335359735},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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 32-bit signed PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":568,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472336121393},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":568,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/receiver/VoiceReceiver.js b/src/client/voice/receiver/VoiceReceiver.js index 41f074357..4af756777 100644 --- a/src/client/voice/receiver/VoiceReceiver.js +++ b/src/client/voice/receiver/VoiceReceiver.js @@ -65,7 +65,7 @@ class VoiceReceiver extends EventEmitter { /** * Creates a readable stream for a user that provides PCM data while the user is speaking. When the user - * stops speaking, the stream is destroyed. The stream is 32-bit signed PCM at 48KHz. + * stops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz. * @param {UserResolvable} user the user to create the stream for * @returns {ReadableStream} */ From ac7e1a052ce96b03bb5f745e92ae45a1e04a8f0e Mon Sep 17 00:00:00 2001 From: abal Date: Sun, 28 Aug 2016 09:35:59 -0700 Subject: [PATCH 222/324] Add opusscript as a possible opus encoder (#558) * Add opusscript as a possible opus encoder * Make weird eslint rule happy --- package.json | 3 ++- src/client/voice/opus/NodeOpusEngine.js | 2 +- src/client/voice/opus/OpusEngineList.js | 1 + src/client/voice/opus/OpusScriptEngine.js | 28 +++++++++++++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 src/client/voice/opus/OpusScriptEngine.js diff --git a/package.json b/package.json index dee11b31c..a0b19e1a1 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,8 @@ "fs-extra": "^0.30.0" }, "optionalDependencies": { - "node-opus": "^0.1.13" + "node-opus": "^0.1.13", + "opusscript": "^0.0.1" }, "engines": { "node": ">=0.12.7" diff --git a/src/client/voice/opus/NodeOpusEngine.js b/src/client/voice/opus/NodeOpusEngine.js index 8f8ba7ca0..52d1d7b0e 100644 --- a/src/client/voice/opus/NodeOpusEngine.js +++ b/src/client/voice/opus/NodeOpusEngine.js @@ -20,7 +20,7 @@ class NodeOpusEngine extends OpusEngine { } decode(buffer) { - super.encode(buffer); + super.decode(buffer); return this.encoder.decode(buffer, 1920); } } diff --git a/src/client/voice/opus/OpusEngineList.js b/src/client/voice/opus/OpusEngineList.js index b30a7c860..fb4b9855b 100644 --- a/src/client/voice/opus/OpusEngineList.js +++ b/src/client/voice/opus/OpusEngineList.js @@ -1,5 +1,6 @@ const list = [ require('./NodeOpusEngine'), + require('./OpusScriptEngine'), ]; exports.add = encoder => { diff --git a/src/client/voice/opus/OpusScriptEngine.js b/src/client/voice/opus/OpusScriptEngine.js new file mode 100644 index 000000000..79df01163 --- /dev/null +++ b/src/client/voice/opus/OpusScriptEngine.js @@ -0,0 +1,28 @@ +const OpusEngine = require('./BaseOpusEngine'); + +let Opusscript; + +class NodeOpusEngine extends OpusEngine { + constructor(player) { + super(player); + try { + // eslint-disable-next-line import/no-unresolved + Opusscript = require('opusscript'); + } catch (err) { + throw err; + } + this.encoder = new Opusscript(48000, 2); + } + + encode(buffer) { + super.encode(buffer); + return this.encoder.encode(buffer, 960); + } + + decode(buffer) { + super.decode(buffer); + return this.encoder.decode(buffer); + } +} + +module.exports = NodeOpusEngine; From ae862c38ffb89d193904fb1211da7e1eccff65ce Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 28 Aug 2016 17:40:24 +0100 Subject: [PATCH 223/324] Remove guild.kick for consistency --- docs/docs.json | 2 +- src/structures/Guild.js | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 0dc3fb3a1..dec819340 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472336121393},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":215,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"Guild#kick","name":"kick","description":"Tries to kick a member from the guild.","memberof":"Guild","examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"meta":{"line":159,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to kick","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"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":171,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":182,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":369,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":382,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":395,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":238,"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":243,"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":248,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":253,"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":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":263,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":283,"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":288,"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":293,"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":298,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":312,"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":568,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472402444932},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":201,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":157,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":168,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":381,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":411,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":224,"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":229,"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":234,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":239,"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":244,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":249,"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":254,"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":259,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":264,"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":269,"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":274,"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":279,"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":284,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":298,"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":554,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 199b26724..a7b159268 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -146,20 +146,6 @@ class Guild { return this.name; } - /** - * Tries to kick a member from the guild. - * @param {GuildMemberResolvable} member the member to kick - * @returns {Promise} - * @example - * // kicks a member from a guild: - * guild.kick(message.author) - * .then(member => console.log(`Kicked ${member}`)) - * .catch(error => console.log(error)); - */ - kick(member) { - return this.member(member).kick(); - } - /** * Returns the GuildMember form of a User object, if the User is present in the guild. * @param {UserResolvable} user the user that you want to obtain the GuildMember of. From 309bc5da1f43d957af525554d9308f5cd03f8021 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 28 Aug 2016 18:12:44 +0100 Subject: [PATCH 224/324] document guildMemberAdd --- docs/docs.json | 2 +- src/structures/Guild.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index dec819340..5ed5b6a33 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472402444932},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":115,"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":201,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":145,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":157,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":168,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":355,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":368,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":381,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":411,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":425,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":439,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":453,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":467,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":481,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":495,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":509,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":523,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":224,"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":229,"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":234,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":239,"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":244,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":249,"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":254,"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":259,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":264,"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":269,"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":274,"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":279,"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":284,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":298,"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":554,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472404372483},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index a7b159268..cfeda68bd 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -89,7 +89,13 @@ class Guild { member.voiceChannelID = voiceState.channel_id; this.channels.get(voiceState.channel_id).members.set(member.user.id, member); } - + /** + * Emitted whenever a user joins a guild. + * + * @event Client#guildMemberAdd + * @param {Guild} guild the guild that the user has joined + * @param {GuildMember} member the member that has joined + */ if (this.client.ws.status === Constants.Status.READY && !noEvent) { this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, member); } From a91fcd5cabf405db7a81ede79106a6b8fccb152d Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 28 Aug 2016 18:50:50 +0100 Subject: [PATCH 225/324] Add ChannelPinsUpdate event --- docs/docs.json | 2 +- .../packets/WebSocketPacketManager.js | 1 + .../packets/handlers/ChannelPinsUpdate.js | 38 +++++++++++++++++++ src/util/Constants.js | 2 + test/random.js | 18 --------- 5 files changed, 42 insertions(+), 19 deletions(-) create mode 100644 src/client/websocket/packets/handlers/ChannelPinsUpdate.js diff --git a/docs/docs.json b/docs/docs.json index 5ed5b6a33..fdc8cd200 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472404372483},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472406655750},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index f9ab37d90..61a5cf857 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -38,6 +38,7 @@ class WebSocketPacketManager { this.register(Constants.WSEvents.MESSAGE_UPDATE, 'MessageUpdate'); this.register(Constants.WSEvents.VOICE_SERVER_UPDATE, 'VoiceServerUpdate'); this.register(Constants.WSEvents.MESSAGE_DELETE_BULK, 'MessageDeleteBulk'); + this.register(Constants.WSEvents.CHANNEL_PINS_UPDATE, 'ChannelPinsUpdate'); } get client() { diff --git a/src/client/websocket/packets/handlers/ChannelPinsUpdate.js b/src/client/websocket/packets/handlers/ChannelPinsUpdate.js new file mode 100644 index 000000000..1604ed1b2 --- /dev/null +++ b/src/client/websocket/packets/handlers/ChannelPinsUpdate.js @@ -0,0 +1,38 @@ +const AbstractHandler = require('./AbstractHandler'); +const Constants = require('../../../../util/Constants'); + +/* +{ t: 'CHANNEL_PINS_UPDATE', + s: 666, + op: 0, + d: + { last_pin_timestamp: '2016-08-28T17:37:13.171774+00:00', + channel_id: '314866471639044027' } } + */ + +class ChannelPinsUpdate extends AbstractHandler { + + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; + + const channel = client.channels.get(data.channel_id); + const time = new Date(data.last_pin_timestamp); + + if (channel && time) { + return client.emit(Constants.Events.CHANNEL_PINS_UPDATE, channel, time); + } + } + +} + +/** +* Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information +* can be provided easily here - you need to manually check the pins yourself. +* +* @event Client#channelPinsUpdate +* @param {Channel} channel The channel that the pins update occured in +* @param {Date} time the time of the pins update +*/ + +module.exports = ChannelPinsUpdate; diff --git a/src/util/Constants.js b/src/util/Constants.js index 47f5c3772..8f909316e 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -165,6 +165,7 @@ exports.Events = { RECONNECTING: 'reconnecting', GUILD_MEMBER_SPEAKING: 'guildMemberSpeaking', MESSAGE_BULK_DELETE: 'messageDeleteBulk', + CHANNEL_PINS_UPDATE: 'channelPinsUpdate', }; exports.WSEvents = { @@ -195,6 +196,7 @@ exports.WSEvents = { FRIEND_REMOVE: 'RELATIONSHIP_REMOVE', VOICE_SERVER_UPDATE: 'VOICE_SERVER_UPDATE', MESSAGE_DELETE_BULK: 'MESSAGE_DELETE_BULK', + CHANNEL_PINS_UPDATE: 'CHANNEL_PINS_UPDATE', }; const PermissionFlags = exports.PermissionFlags = { diff --git a/test/random.js b/test/random.js index 7a2adaf32..c6249c091 100644 --- a/test/random.js +++ b/test/random.js @@ -12,10 +12,6 @@ client.on('ready', () => { console.log('ready!'); }); -client.on('messageDeleteBulk', msgs => { - msgs.array().map(m => console.log(m.content)); -}); - client.on('message', message => { if (true) { if (message.content === 'makechann') { @@ -109,20 +105,6 @@ function chanLoop(channel) { channel.setName(channel.name + 'a').then(chanLoop).catch(console.log); } -client.on('messageDelete', message => { - console.log('Message deleted by', message.author.username); -}); - -client.on('messageUpdate', (old, message) => { - if (message.author.username === 'hydrabolt') - console.log('Message updated from', old.content, 'to', message.content); -}); - -client.on('guildMemberSpeaking', (member, speaking) => { - const message = speaking ? `${member.user.username} is speaking` : `${member.user.username} is not speaking`; - member.guild.channels.get(member.guild.id).sendMessage(message); -}); - client.on('message', msg => { if (msg.content.startsWith('?raw')) { msg.channel.sendMessage('```' + msg.content + '```'); From 93771ce6d0a89fc76658b9b5d72432cd90cd18c5 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 28 Aug 2016 18:55:21 +0100 Subject: [PATCH 226/324] Make opusscript a dependency --- docs/docs.json | 2 +- package.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index fdc8cd200..fd741c3d6 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472406655750},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472406926078},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/package.json b/package.json index a0b19e1a1..5f885f5ae 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,8 @@ "dependencies": { "superagent": "^1.5.0", "tweetnacl": "^0.14.3", - "ws": "^1.1.1" + "ws": "^1.1.1", + "opusscript": "^0.0.1" }, "devDependencies": { "jsdoc-parse": "^1.2.7", From 3462bbc8d41324ea3339923b2c0bd0936445080b Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 28 Aug 2016 18:55:41 +0100 Subject: [PATCH 227/324] Remove opusscript from optionals whoops --- docs/docs.json | 2 +- package.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index fd741c3d6..6d2bf6cd6 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472406926078},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472406946249},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/package.json b/package.json index 5f885f5ae..28777cfe7 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,7 @@ "fs-extra": "^0.30.0" }, "optionalDependencies": { - "node-opus": "^0.1.13", - "opusscript": "^0.0.1" + "node-opus": "^0.1.13" }, "engines": { "node": ">=0.12.7" From 6ea2a523d62d2363667e8f74cd1cddbea9bd802e Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 28 Aug 2016 18:56:08 +0100 Subject: [PATCH 228/324] Update node engine requirements --- docs/docs.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 6d2bf6cd6..b20205256 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472406946249},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472406972504},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/package.json b/package.json index 28777cfe7..033892fd0 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "node-opus": "^0.1.13" }, "engines": { - "node": ">=0.12.7" + "node": ">=6.4.0" }, "browser": { "./src/Util/TokenCacher.js": "./src/Util/TokenCacher-shim.js", From a57d6b723a408d636b9694845060bfac55c0bd7b Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 28 Aug 2016 19:03:02 +0100 Subject: [PATCH 229/324] Add message.pin() and .unpin(); --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 16 ++++++++++++++++ src/structures/Message.js | 16 ++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index b20205256..5045239cd 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472406972504},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472407388017},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 353bf35c7..17e58d7bb 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -476,6 +476,22 @@ class RESTMethods { .catch(reject); }); } + + pinMessage(message) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('put', `${Constants.Endpoints.channel(message.channel.id)}/pins/${message.id}`, true) + .then(() => resolve(message)) + .catch(reject); + }); + } + + unpinMessage(message) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', `${Constants.Endpoints.channel(message.channel.id)}/pins/${message.id}`, true) + .then(() => resolve(message)) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/structures/Message.js b/src/structures/Message.js index cb2d06703..918475f95 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -265,6 +265,22 @@ class Message { const newContent = this.guild ? `${this.author}, ${content}` : content; return this.client.rest.methods.sendMessage(this.channel, newContent, options.tts); } + + /** + * Pins this message to the channel's pinned messages + * @returns {Promise} + */ + pin() { + return this.client.rest.methods.pinMessage(this); + } + + /** + * Unpins this message from the channel's pinned messages + * @returns {Promise} + */ + unpin() { + return this.client.rest.methods.unpinMessage(this); + } } module.exports = Message; From 9f1475f358210c03eae8aa85e159aa775b1cbb3f Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 28 Aug 2016 19:42:35 +0100 Subject: [PATCH 230/324] Add TextBasedChanel.fetchPinnedMessages() --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 4 ++++ src/structures/DMChannel.js | 4 ++++ src/structures/GroupDMChannel.js | 4 ++++ src/structures/TextChannel.js | 4 ++++ src/structures/interface/TextBasedChannel.js | 21 ++++++++++++++++++++ 6 files changed, 38 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 5045239cd..eabd848f6 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472407388017},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472409760784},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 17e58d7bb..629161765 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -492,6 +492,10 @@ class RESTMethods { .catch(reject); }); } + + getChannelPinnedMessages(channel) { + return this.rest.makeRequest('get', `${Constants.Endpoints.channel(channel.id)}/pins`, true); + } } module.exports = RESTMethods; diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 26b81dee2..b591d2c9c 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -62,6 +62,10 @@ class DMChannel extends Channel { setTyping() { return; } + + fetchPinnedMessages() { + return; + } } TextBasedChannel.applyToClass(DMChannel, true); diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index 665be0dbe..9760c0b10 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -139,6 +139,10 @@ class GroupDMChannel extends Channel { setTyping() { return; } + + fetchPinnedMessages() { + return; + } } TextBasedChannel.applyToClass(GroupDMChannel, true); diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index a956aac3b..c101f1721 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -47,6 +47,10 @@ class TextChannel extends GuildChannel { setTyping() { return; } + + fetchPinnedMessages() { + return; + } } TextBasedChannel.applyToClass(TextChannel, true); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index fbfda5c86..e7267279a 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -146,6 +146,26 @@ class TextBasedChannel { return message; } + + /** + * Fetches the pinned messages of this Channel and returns a Collection of them. + * @returns {Promise, Error>} + */ + fetchPinnedMessages() { + return new Promise((resolve, reject) => { + this.client.rest.methods.getChannelPinnedMessages(this) + .then(data => { + const messages = new Collection(); + for (const message of data) { + const msg = new Message(this, message, this.client); + messages.set(message.id, msg); + this._cacheMessage(msg); + } + resolve(messages); + }) + .catch(reject); + }); + } } function applyProp(structure, prop) { @@ -159,6 +179,7 @@ exports.applyToClass = (structure, full = false) => { props.push('getMessages'); props.push('bulkDelete'); props.push('setTyping'); + props.push('fetchPinnedMessages'); } for (const prop of props) { applyProp(structure, prop); From ba3d1046196c34f5dbb368b86d86ce4ae8cf5cf2 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 28 Aug 2016 20:32:32 +0100 Subject: [PATCH 231/324] Added guildChannel.createInvite(); --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 14 ++++ src/structures/GuildChannel.js | 25 ++++++- src/structures/Invite.js | 97 +++++++++++++++++++++++++++ src/structures/PartialGuild.js | 45 +++++++++++++ src/structures/PartialGuildChannel.js | 39 +++++++++++ 6 files changed, 219 insertions(+), 3 deletions(-) create mode 100644 src/structures/Invite.js create mode 100644 src/structures/PartialGuild.js create mode 100644 src/structures/PartialGuildChannel.js diff --git a/docs/docs.json b/docs/docs.json index eabd848f6..b180dada2 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472409760784},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"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.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"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":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472412757714},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 629161765..394ba42c5 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -5,6 +5,7 @@ const getStructure = name => require(`../../structures/${name}`); const User = getStructure('User'); const GuildMember = getStructure('GuildMember'); const Role = getStructure('Role'); +const Invite = getStructure('Invite'); class RESTMethods { constructor(restManager) { @@ -496,6 +497,19 @@ class RESTMethods { getChannelPinnedMessages(channel) { return this.rest.makeRequest('get', `${Constants.Endpoints.channel(channel.id)}/pins`, true); } + + createChannelInvite(channel, options) { + return new Promise((resolve, reject) => { + const payload = {}; + payload.temporary = options.temporary; + payload.max_age = options.maxAge; + payload.max_uses = options.maxUses; + + this.rest.makeRequest('post', `${Constants.Endpoints.channelInvites(channel.id)}`, true, payload) + .then(invite => resolve(new Invite(this.rest.client, invite))) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index b8c876f75..d5304aa26 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -245,7 +245,7 @@ class GuildChannel extends Channel { * .catch(console.log); */ setPosition(position) { - return this.rest.client.rest.methods.updateChannel(this, { position }); + return this.client.rest.methods.updateChannel(this, { position }); } /** @@ -259,7 +259,7 @@ class GuildChannel extends Channel { * .catch(console.log); */ setTopic(topic) { - return this.rest.client.rest.methods.updateChannel(this, { topic }); + return this.client.rest.methods.updateChannel(this, { topic }); } /** @@ -275,6 +275,27 @@ class GuildChannel extends Channel { toString() { return `<#${this.id}>`; } + + /** + * Options given when creating a Guild Channel Invite: + * ```js + * { + * temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role + * maxAge: 0, // the time in seconds the invite expires in + * maxUses: 0, // the maximum amount of uses for this invite + * } + * ``` + * @typedef {Object} InviteOptions + */ + + /** + * Create an invite to this Guild Channel + * @param {InviteOptions} [options={}] the options to provide when creating the invite + * @returns {Promise} + */ + createInvite(options = {}) { + return this.client.rest.methods.createChannelInvite(this, options); + } } module.exports = GuildChannel; diff --git a/src/structures/Invite.js b/src/structures/Invite.js new file mode 100644 index 000000000..cdd0d4aef --- /dev/null +++ b/src/structures/Invite.js @@ -0,0 +1,97 @@ +const PartialGuild = require('./PartialGuild'); +const PartialGuildChannel = require('./PartialGuildChannel'); + +/* +{ max_age: 86400, + code: 'CG9A5', + guild: + { splash: null, + id: '123123123', + icon: '123123123', + name: 'name' }, + created_at: '2016-08-28T19:07:04.763368+00:00', + temporary: false, + uses: 0, + max_uses: 0, + inviter: + { username: '123', + discriminator: '4204', + bot: true, + id: '123123123', + avatar: '123123123' }, + channel: { type: 0, id: '123123', name: 'heavy-testing' } } +*/ + +/** + * Represents an Invitation to a Guild Channel + */ +class Invite { + constructor(client, data) { + /** + * The client that instantiated the invite + * @type {Client} + */ + this.client = client; + this.setup(data); + } + + setup(data) { + /** + * The maximum age of the invite, in seconds + * @type {?Number} + */ + this.maxAge = data.max_age; + + /** + * The code for this invite + * @type {String} + */ + this.code = data.code; + + /** + * The creation date of the invite + * @type {Date} + */ + this.creationDate = new Date(data.created_at); + + /** + * Whether or not this invite is temporary + * @type {Boolean} + */ + this.temporary = data.temporary; + + /** + * How many times this invite has been used + * @type {Number} + */ + this.uses = data.uses; + + /** + * The maximum uses of this invite + * @type {Number} + */ + this.maxUses = data.max_uses; + + /** + * The user who created this invite + * @type {User} + */ + this.inviter = this.client.dataManager.newUser(data.inviter); + + /** + * The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is + * unknown, this will be a Partial Guild. + * @type {Guild|PartialGuild} + */ + this.guild = this.client.guilds.get(data.guild.id) || new PartialGuild(this.client, data.guild); + + /** + * The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object. + * If the Channel is unknown, this will be a Partial Guild Channel. + * @type {GuildChannel|PartialGuildChannel} + */ + this.channels = this.client.channels.get(data.channel.id) || new PartialGuildChannel(this.client, data.channel); + } +} + +module.exports = Invite; diff --git a/src/structures/PartialGuild.js b/src/structures/PartialGuild.js new file mode 100644 index 000000000..881b8b71a --- /dev/null +++ b/src/structures/PartialGuild.js @@ -0,0 +1,45 @@ +/* +{ splash: null, + id: '123123123', + icon: '123123123', + name: 'name' } +*/ + +/** + * Represents a Guild that the client only has limited information for - e.g. from invites. + */ +class PartialGuild { + constructor(client, data) { + /** + * The client that instantiated this PartialGuild + * @type {Client} + */ + this.client = client; + this.setup(data); + } + + setup(data) { + /** + * The hash of the guild splash image, or null if no splash (VIP only) + * @type {?String} + */ + this.splash = data.splash; + /** + * The ID of this guild + * @type {String} + */ + this.id = data.id; + /** + * The hash of this guild's icon, or null if there is none. + * @type {?String} + */ + this.icon = data.icon; + /** + * The name of this guild + * @type {String} + */ + this.name = data.name; + } +} + +module.exports = PartialGuild; diff --git a/src/structures/PartialGuildChannel.js b/src/structures/PartialGuildChannel.js new file mode 100644 index 000000000..4aca8c901 --- /dev/null +++ b/src/structures/PartialGuildChannel.js @@ -0,0 +1,39 @@ +const Constants = require('../util/Constants'); + +/* +{ type: 0, id: '123123', name: 'heavy-testing' } } +*/ + +/** + * Represents a Guild Channel that the client only has limited information for - e.g. from invites. + */ +class PartialGuildChannel { + constructor(client, data) { + /** + * The client that instantiated this PartialGuildChannel + * @type {Client} + */ + this.client = client; + this.setup(data); + } + + setup(data) { + /** + * The ID of this Guild Channel + * @type {String} + */ + this.id = data.id; + /** + * The name of this Guild Channel + * @type {String} + */ + this.name = data.name; + /** + * The type of this Guild Channel - `text` or `voice` + * @type {String} + */ + this.type = Constants.ChannelTypes.text === data.type ? 'text' : 'voice'; + } +} + +module.exports = PartialGuildChannel; From 1dba048d2eb5482258c73315863d2c70b5e7eb88 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 28 Aug 2016 20:51:21 +0100 Subject: [PATCH 232/324] Add invite.delete() --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 8 ++++++++ src/structures/Invite.js | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index b180dada2..999497e02 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472412757714},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472413887214},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 394ba42c5..091b4cfd9 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -510,6 +510,14 @@ class RESTMethods { .catch(reject); }); } + + deleteInvite(invite) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('del', Constants.Endpoints.invite(invite.code), true) + .then(() => resolve(invite)) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/structures/Invite.js b/src/structures/Invite.js index cdd0d4aef..433fd99ef 100644 --- a/src/structures/Invite.js +++ b/src/structures/Invite.js @@ -92,6 +92,14 @@ class Invite { */ this.channels = this.client.channels.get(data.channel.id) || new PartialGuildChannel(this.client, data.channel); } + + /** + * Deletes this invite + * @returns {Promise} + */ + delete() { + return this.client.rest.methods.deleteInvite(this); + } } module.exports = Invite; From b44a3770d95ab192b6c9e458dcb2354280175f99 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 28 Aug 2016 20:59:56 +0100 Subject: [PATCH 233/324] Added guild.fetchInvites() --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 15 +++++++++++++++ src/structures/Guild.js | 8 ++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 999497e02..de9d39de0 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472413887214},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":560,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472414401522},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":568,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 091b4cfd9..25166add0 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -518,6 +518,21 @@ class RESTMethods { .catch(reject); }); } + + getGuildInvites(guild) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.guildInvites(guild.id), true) + .then(inviteItems => { + const invites = new Collection(); + for (const inviteItem of inviteItems) { + const invite = new Invite(this.rest.client, inviteItem); + invites.set(invite.code, invite); + } + resolve(invites); + }) + .catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index cfeda68bd..785b16120 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -552,6 +552,14 @@ class Guild { return this.client.rest.methods.getGuildBans(this); } + /** + * Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes. + * @returns {Promise, Error>} + */ + fetchInvites() { + return this.client.rest.methods.getGuildInvites(this); + } + /** * Gets the URL to this guild's icon (if it has one, otherwise it returns null) * @type {?String} From 0b4f4a559c51020c1d4b2117e9aea68be712577d Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 29 Aug 2016 01:54:10 -0400 Subject: [PATCH 234/324] Make existence checks use .has(id) (#559) --- src/client/ClientDataManager.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/ClientDataManager.js b/src/client/ClientDataManager.js index 0d7269936..ad7c0285c 100644 --- a/src/client/ClientDataManager.js +++ b/src/client/ClientDataManager.js @@ -18,7 +18,7 @@ class ClientDataManager { } newGuild(data) { - const already = this.client.guilds.get(data.id); + const already = this.client.guilds.has(data.id); const guild = new Guild(this.client, data); this.client.guilds.set(guild.id, guild); if (this.pastReady && !already) { @@ -35,7 +35,7 @@ class ClientDataManager { } newUser(data) { - if (this.client.users.get(data.id)) { + if (this.client.users.has(data.id)) { return this.client.users.get(data.id); } const user = new User(this.client, data); @@ -45,7 +45,7 @@ class ClientDataManager { newChannel(data, $guild) { let guild = $guild; - const already = this.client.channels.get(data.id); + const already = this.client.channels.has(data.id); let channel; if (data.type === Constants.ChannelTypes.DM) { channel = new DMChannel(this.client, data); @@ -76,7 +76,7 @@ class ClientDataManager { } killGuild(guild) { - const already = this.client.guilds.get(guild.id); + const already = this.client.guilds.has(guild.id); this.client.guilds.delete(guild.id); if (already && this.pastReady) { this.client.emit(Constants.Events.GUILD_DELETE, guild); From fe58105d0479fbcfb15bebe18398ea4fc65607d1 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 29 Aug 2016 12:42:38 +0100 Subject: [PATCH 235/324] Fix memberCount inaccuracy --- docs/docs.json | 2 +- src/structures/Guild.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index de9d39de0..6bd037027 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472414401522},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"types":[[["Number",""]]]},"meta":{"line":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":568,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472471068977},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"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":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":568,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 785b16120..35198ac82 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -239,7 +239,7 @@ class Guild { */ this.name = data.name; /** - * The amount of initial members in the guild. + * The full amount of members in this Guild as of `READY` * @type {Number} */ this.memberCount = data.member_count; From 001460acc0327a494caf2d1b7be28cc60f470a85 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 29 Aug 2016 13:20:00 +0100 Subject: [PATCH 236/324] =?UTF-8?q?Add=20guild.fetchMembers()=20?= =?UTF-8?q?=F0=9F=8E=89=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs.json | 2 +- src/client/actions/GuildMemberRemove.js | 1 + .../packets/handlers/GuildMemberAdd.js | 1 + .../packets/handlers/GuildMembersChunk.js | 4 +-- src/structures/Guild.js | 36 +++++++++++++++++++ 5 files changed, 41 insertions(+), 3 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 6bd037027..3fffc8020 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472471068977},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":49,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":92,"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":121,"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":207,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":151,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":361,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":431,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":445,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":459,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":473,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":487,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":501,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":515,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":529,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":543,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":551,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"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":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":230,"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":235,"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":240,"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":245,"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":250,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":255,"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":260,"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":265,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":270,"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":275,"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":280,"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":285,"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":290,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":304,"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":568,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472473206102},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":101,"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":131,"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":218,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":162,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":185,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":372,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":411,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":428,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":442,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":456,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":470,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":484,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":498,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":512,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":526,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":540,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":554,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":562,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":570,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":580,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":241,"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":246,"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":251,"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":256,"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":261,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":281,"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":286,"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":291,"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":296,"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":301,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":315,"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":604,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/actions/GuildMemberRemove.js b/src/client/actions/GuildMemberRemove.js index 004a995bf..01e45fa94 100644 --- a/src/client/actions/GuildMemberRemove.js +++ b/src/client/actions/GuildMemberRemove.js @@ -15,6 +15,7 @@ class GuildMemberRemoveAction extends Action { if (guild) { let member = guild.members.get(data.user.id); if (member) { + guild.memberCount--; guild._removeMember(member); this.deleted[guild.id + data.user.id] = member; client.emit(Constants.Events.GUILD_MEMBER_REMOVE, guild, member); diff --git a/src/client/websocket/packets/handlers/GuildMemberAdd.js b/src/client/websocket/packets/handlers/GuildMemberAdd.js index ad6f4d49d..cfdb6a263 100644 --- a/src/client/websocket/packets/handlers/GuildMemberAdd.js +++ b/src/client/websocket/packets/handlers/GuildMemberAdd.js @@ -11,6 +11,7 @@ class GuildMemberAddHandler extends AbstractHandler { const guild = client.guilds.get(data.guild_id); if (guild) { + guild.memberCount++; guild._addMember(data); } } diff --git a/src/client/websocket/packets/handlers/GuildMembersChunk.js b/src/client/websocket/packets/handlers/GuildMembersChunk.js index 4ab6a2aad..466ae6641 100644 --- a/src/client/websocket/packets/handlers/GuildMembersChunk.js +++ b/src/client/websocket/packets/handlers/GuildMembersChunk.js @@ -9,14 +9,14 @@ class GuildMembersChunkHandler extends AbstractHandler { const data = packet.d; const client = this.packetManager.client; const guild = client.guilds.get(data.guild_id); - const members = []; if (guild) { - for (const member of guild.members) { + for (const member of data.members) { members.push(guild._addMember(member, true)); } } + guild._checkChunks(); client.emit(Constants.Events.GUILD_MEMBERS_CHUNK, guild, members); } diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 35198ac82..03bff6697 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -70,6 +70,15 @@ class Guild { } } + _checkChunks() { + if (this._fetchWaiter) { + if (this.members.size === this.memberCount) { + this._fetchWaiter(this); + this._fetchWaiter = null; + } + } + } + _addMember(guildUser, noEvent) { if (!(guildUser.user instanceof User)) { guildUser.user = this.client.dataManager.newUser(guildUser.user); @@ -100,6 +109,7 @@ class Guild { this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, member); } + this._checkChunks(); return member; } @@ -136,6 +146,7 @@ class Guild { _removeMember(guildMember) { this.members.delete(guildMember.id); + this._checkChunks(); } /** @@ -560,6 +571,31 @@ class Guild { return this.client.rest.methods.getGuildInvites(this); } + /** + * Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members, + * this should not be necessary. + * @param {String} [query=''] An optional query to provide when fetching members + * @returns {Promise} + */ + fetchMembers(query = '') { + return new Promise((resolve, reject) => { + if (this._fetchWaiter) { + throw new Error('already fetching guild members'); + } + this._fetchWaiter = resolve; + this.client.ws.send({ + op: Constants.OPCodes.REQUEST_GUILD_MEMBERS, + d: { + guild_id: this.id, + query, + limit: 0, + }, + }); + this._checkChunks(); + setTimeout(() => reject(new Error('members not here in time')), 10000); + }); + } + /** * Gets the URL to this guild's icon (if it has one, otherwise it returns null) * @type {?String} From 144638e746516395851b28d77fce9ba1a7fd89ba Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 29 Aug 2016 13:54:29 +0100 Subject: [PATCH 237/324] Experimental ClientOptions.fetch_all_members --- docs/docs.json | 2 +- src/client/ClientManager.js | 2 +- src/client/websocket/WebSocketManager.js | 53 ++++++++++++++----- .../packets/WebSocketPacketManager.js | 1 + .../packets/handlers/GuildMembersChunk.js | 1 + src/structures/Guild.js | 5 +- src/util/Constants.js | 3 ++ 7 files changed, 52 insertions(+), 15 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 3fffc8020..8fd905a74 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472473206102},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":25,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":189,"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":208,"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":101,"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":131,"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":218,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":162,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":185,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":372,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":411,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":428,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":442,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":456,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":470,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":484,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":498,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":512,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":526,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":540,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":554,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":562,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":570,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":580,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":241,"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":246,"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":251,"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":256,"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":261,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":281,"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":286,"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":291,"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":296,"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":301,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":315,"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":604,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472475275037},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":101,"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":131,"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":218,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":162,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":185,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":372,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":411,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":428,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":442,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":456,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":470,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":484,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":498,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":512,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":526,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":540,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":554,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":562,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":570,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":580,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":241,"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":246,"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":251,"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":256,"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":261,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":281,"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":286,"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":291,"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":296,"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":301,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":315,"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":607,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index ada92a8fa..718fa1852 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -35,7 +35,7 @@ class ClientManager { }) .catch(reject); - setTimeout(() => reject(Constants.Errors.TOOK_TOO_LONG), 1000 * 15); + setTimeout(() => reject(Constants.Errors.TOOK_TOO_LONG), 1000 * 300); } /** diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 190873b60..f8dc9d1e0 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -62,6 +62,8 @@ class WebSocketManager { this.ws.onclose = (d) => this.eventClose(d); this.ws.onmessage = (e) => this.eventMessage(e); this.ws.onerror = (e) => this.eventError(e); + this._queue = []; + this._remaining = 3; } /** @@ -70,8 +72,23 @@ class WebSocketManager { * @returns {null} */ send(data) { - if (this.ws.readyState === WebSocket.OPEN) { - this.ws.send(JSON.stringify(data)); + this._queue.push(JSON.stringify(data)); + this.doQueue(); + } + + doQueue() { + const item = this._queue[0]; + if (this.ws.readyState === WebSocket.OPEN && item) { + if (this._remaining === 0) { + return setTimeout(() => { + this.doQueue(); + }, 1000); + } + this._remaining--; + this.ws.send(item); + this._queue.shift(); + this.doQueue(); + setTimeout(() => this._remaining++, 1000); } } @@ -127,6 +144,7 @@ class WebSocketManager { * @returns {null} */ eventClose(event) { + console.log(event.code); if (event.code === 4004) { throw Constants.Errors.BAD_LOGIN; } @@ -172,27 +190,38 @@ class WebSocketManager { this.tryReconnect(); } + _emitReady() { + /** + * Emitted when the Client becomes ready to start working + * + * @event Client#ready + */ + this.status = Constants.Status.READY; + this.client.emit(Constants.Events.READY); + this.packetManager.handleQueue(); + } + /** * Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares * the `READY` event. * @returns {null} */ checkIfReady() { - if (this.status !== Constants.Status.READY) { + if (this.status !== Constants.Status.READY && this.status !== Constants.Status.NEARLY) { let unavailableCount = 0; for (const guildID of this.client.guilds.keys()) { unavailableCount += this.client.guilds.get(guildID).available ? 0 : 1; } - if (unavailableCount === 0) { - this.status = Constants.Status.READY; - /** - * Emitted when the Client becomes ready to start working - * - * @event Client#ready - */ - this.client.emit(Constants.Events.READY); - this.packetManager.handleQueue(); + this.status = Constants.Status.NEARLY; + if (this.client.options.fetch_all_members) { + const promises = this.client.guilds.array().map(g => g.fetchMembers()); + return Promise.all(promises).then(() => this._emitReady()).catch(e => { + this.client.emit('warn', `error on pre-ready guild member fetching - ${e}`); + this._emitReady(); + }); + } + this._emitReady(); } } } diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 61a5cf857..88b0f5c0e 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -4,6 +4,7 @@ const BeforeReadyWhitelist = [ Constants.WSEvents.READY, Constants.WSEvents.GUILD_CREATE, Constants.WSEvents.GUILD_DELETE, + Constants.WSEvents.GUILD_MEMBERS_CHUNK, ]; class WebSocketPacketManager { diff --git a/src/client/websocket/packets/handlers/GuildMembersChunk.js b/src/client/websocket/packets/handlers/GuildMembersChunk.js index 466ae6641..bca64ed99 100644 --- a/src/client/websocket/packets/handlers/GuildMembersChunk.js +++ b/src/client/websocket/packets/handlers/GuildMembersChunk.js @@ -10,6 +10,7 @@ class GuildMembersChunkHandler extends AbstractHandler { const client = this.packetManager.client; const guild = client.guilds.get(data.guild_id); const members = []; + if (guild) { for (const member of data.members) { members.push(guild._addMember(member, true)); diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 03bff6697..def698fce 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -582,6 +582,9 @@ class Guild { if (this._fetchWaiter) { throw new Error('already fetching guild members'); } + if (this.memberCount === this.members.size) { + return resolve(this); + } this._fetchWaiter = resolve; this.client.ws.send({ op: Constants.OPCodes.REQUEST_GUILD_MEMBERS, @@ -592,7 +595,7 @@ class Guild { }, }); this._checkChunks(); - setTimeout(() => reject(new Error('members not here in time')), 10000); + setTimeout(() => reject(new Error('members not here in time')), 120 * 1000); }); } diff --git a/src/util/Constants.js b/src/util/Constants.js index 8f909316e..92ef6e5b1 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -19,6 +19,7 @@ * api_request_method: 'sequential', * shard_id: 0, * shard_count: 0, + * fetch_all_members: false, * }; * ``` * @typedef {Object} ClientOptions @@ -41,6 +42,7 @@ exports.DefaultOptions = { api_request_method: 'sequential', shard_id: 0, shard_count: 0, + fetch_all_members: false, }; exports.Status = { @@ -48,6 +50,7 @@ exports.Status = { CONNECTING: 1, RECONNECTING: 2, IDLE: 3, + NEARLY: 4, }; exports.ChannelTypes = { From 5d06be6333bc7a0a09a92beccebe60c9e723f19c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 29 Aug 2016 15:18:35 +0100 Subject: [PATCH 238/324] Add Emoji class --- docs/docs.json | 2 +- src/structures/Emoji.js | 83 +++++++++++++++++++++++++++++++++++++++++ src/structures/Guild.js | 6 ++- src/util/Constants.js | 1 + test/random.js | 2 +- 5 files changed, 91 insertions(+), 3 deletions(-) create mode 100644 src/structures/Emoji.js diff --git a/docs/docs.json b/docs/docs.json index 8fd905a74..e3a73b1d3 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472475275037},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":101,"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":131,"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":218,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":26,"file":"Guild.js","path":"src/structures"},"methods":[{"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":162,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":174,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":185,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":372,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":385,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":398,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":411,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":428,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":442,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":456,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":470,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":484,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":498,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":512,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":526,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":540,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":554,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":562,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":570,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":580,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":32,"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":38,"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":44,"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":50,"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":61,"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":66,"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":241,"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":246,"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":251,"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":256,"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":261,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":266,"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":271,"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":276,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":281,"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":286,"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":291,"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":296,"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":301,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":315,"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":607,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472480321228},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/Emoji.js b/src/structures/Emoji.js new file mode 100644 index 000000000..ec7bf9914 --- /dev/null +++ b/src/structures/Emoji.js @@ -0,0 +1,83 @@ +const Collection = require('../util/Collection'); +const Constants = require('../util/Constants'); + +/** + * Represents a Custom Emoji + */ +class Emoji { + constructor(guild, data) { + /** + * The Client that instantiated this object + * @type {Client} + */ + this.client = guild.client; + /** + * The Guild this emoji is part of + * @type {Guild} + */ + this.guild = guild; + this.setup(data); + } + + setup(data) { + /** + * The ID of the Emoji + * @type {String} + */ + this.id = data.id; + /** + * The name of the Emoji + * @type {String} + */ + this.name = data.name; + this.roleIDS = data.roles; + /** + * Whether or not this emoji requires colons surrounding it + * @type {Boolean} + */ + this.requiresColons = data.require_colons; + /** + * Whether this emoji is managed by an external service + * @type {Boolean} + */ + this.managed = data.managed; + } + + /** + * A collection of roles this emoji is active for (empty if all). Mapped by role ID. + * @type {Collection} + * @readonly + */ + get roles() { + const roles = new Collection(); + for (const role of this.roleIDS) { + if (this.guild.roles.get(role)) { + roles.set(role, this.guild.roles.get(role)); + } + } + return roles; + } + + /** + * The URL to the emoji file + * @type {String} + * @readonly + */ + get url() { + return `${Constants.Endpoints.CDN}/emojis/${this.id}.png`; + } + + /** + * When concatenated with a String, this automatically returns the emoji mention rather than the object. + * @returns {String} + * @example + * // send an emoji: + * const emoji = guild.emojis.array()[0]; + * msg.reply(`Hello! ${emoji}`); + */ + toString() { + return this.requiresColons ? `<:${this.name}:${this.id}>` : this.name; + } +} + +module.exports = Emoji; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index def698fce..e985d3ba8 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -4,6 +4,7 @@ const Constants = require('../util/Constants'); const cloneObject = require('../util/CloneObject'); const Role = require('./Role'); const Collection = require('../util/Collection'); +const Emoji = require('./Emoji'); function arraysEqual(a, b) { if (a === b) return true; @@ -278,7 +279,10 @@ class Guild { * An array of guild emojis. * @type {Array} */ - this.emojis = data.emojis; + this.emojis = new Collection(); + for (const emoji of data.emojis) { + this.emojis.set(emoji.id, new Emoji(this, emoji)); + } /** * The time in seconds before a user is counted as "away from keyboard". * @type {?Number} diff --git a/src/util/Constants.js b/src/util/Constants.js index 92ef6e5b1..88d8d52a2 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -80,6 +80,7 @@ const Endpoints = exports.Endpoints = { logout: `${API}/auth/logout`, gateway: `${API}/gateway`, invite: (id) => `${API}/invite/${id}`, + CDN: 'https://cdn.discordapp.com', // users user: (userID) => `${API}/users/${userID}`, diff --git a/test/random.js b/test/random.js index c6249c091..01700ef45 100644 --- a/test/random.js +++ b/test/random.js @@ -4,7 +4,7 @@ const Discord = require('../'); const request = require('superagent'); const fs = require('fs'); -const client = new Discord.Client(); +const client = new Discord.Client({ fetch_all_members: false }); client.login(require('./auth.json').token).then(token => console.log('logged in with token ' + token)).catch(console.log); From f6c95de85db09b4abf1f1de747019bf68ad8a366 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 29 Aug 2016 15:35:39 +0100 Subject: [PATCH 239/324] Create MessageAttachment class --- src/structures/Message.js | 15 +++++--- src/structures/MessageAttachment.js | 56 +++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 src/structures/MessageAttachment.js diff --git a/src/structures/Message.js b/src/structures/Message.js index 918475f95..088566fd7 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -1,4 +1,5 @@ const Collection = require('../util/Collection'); +const Attachment = require('./MessageAttachment'); /** * Represents a Message on Discord */ @@ -76,10 +77,13 @@ class Message { */ this.embeds = data.embeds; /** - * A list of attachments in the message - e.g. Pictures - * @type {Array} + * A collection of attachments in the message - e.g. Pictures - mapped by their ID. + * @type {Collection} */ - this.attachments = data.attachments; + this.attachments = new Collection(); + for (const attachment of data.attachments) { + this.attachments.set(attachment.id, new Attachment(this, attachment)); + } /** * An object containing a further users, roles or channels collections * @type {Object} @@ -155,7 +159,10 @@ class Message { this.embeds = data.embeds; } if (data.attachments) { - this.attachments = data.attachments; + this.attachments = new Collection(); + for (const attachment of data.attachments) { + this.attachments.set(attachment.id, new Attachment(this, attachment)); + } } if (data.mentions) { for (const mention of data.mentions) { diff --git a/src/structures/MessageAttachment.js b/src/structures/MessageAttachment.js new file mode 100644 index 000000000..29add4abc --- /dev/null +++ b/src/structures/MessageAttachment.js @@ -0,0 +1,56 @@ +/** + * Represents an Attachment in a Message + */ +class MessageAttachment { + constructor(message, data) { + /** + * The Client that instantiated this Message. + */ + this.client = message.client; + /** + * The message this attachment is part of. + */ + this.message = message; + this.setup(data); + } + + setup(data) { + /** + * The ID of this attachment + * @type {String} + */ + this.id = data.id; + /** + * The file name of this attachment + * @type {String} + */ + this.filename = data.filename; + /** + * The size of this attachment in bytes + * @type {Number} + */ + this.filesize = data.size; + /** + * The URL to this attachment + * @type {String} + */ + this.url = data.url; + /** + * The Proxy URL to this attachment + * @type {String} + */ + this.proxyURL = data.url; + /** + * The height of this attachment (if an image) + * @type {?Number} + */ + this.height = data.height; + /** + * The width of this attachment (if an image) + * @type {?Number} + */ + this.width = data.width; + } +} + +module.exports = MessageAttachment; From 3541b0a88f72fe915ca90a9d69735922fc6975ea Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 29 Aug 2016 15:53:51 +0100 Subject: [PATCH 240/324] Add MessageEmbed and subclasses --- docs/docs.json | 2 +- src/structures/Message.js | 7 +- src/structures/MessageAttachment.js | 2 + src/structures/MessageEmbed.js | 121 ++++++++++++++++++++++++++++ 4 files changed, 128 insertions(+), 4 deletions(-) create mode 100644 src/structures/MessageEmbed.js diff --git a/docs/docs.json b/docs/docs.json index e3a73b1d3..4bdaadb05 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472480321228},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":5,"file":"Message.js","path":"src/structures"},"methods":[{"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":201,"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#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.log);"],"meta":{"line":235,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":249,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":273,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":12,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":26,"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":37,"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":42,"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":47,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"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":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"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",".<"],["Object",">"]]]},"meta":{"line":77,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":82,"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":91,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":100,"file":"Message.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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472482437361},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":243,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":257,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":272,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":289,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/Message.js b/src/structures/Message.js index 088566fd7..e84008dcf 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -1,5 +1,6 @@ const Collection = require('../util/Collection'); const Attachment = require('./MessageAttachment'); +const Embed = require('./MessageEmbed'); /** * Represents a Message on Discord */ @@ -73,9 +74,9 @@ class Message { this.nonce = data.nonce; /** * A list of embeds in the message - e.g. YouTube Player - * @type {Array} + * @type {Array} */ - this.embeds = data.embeds; + this.embeds = data.embeds.map(e => new Embed(this, e)); /** * A collection of attachments in the message - e.g. Pictures - mapped by their ID. * @type {Collection} @@ -156,7 +157,7 @@ class Message { this.nonce = data.nonce; } if (data.embeds) { - this.embeds = data.embeds; + this.embeds = data.embeds.map(e => new Embed(this, e)); } if (data.attachments) { this.attachments = new Collection(); diff --git a/src/structures/MessageAttachment.js b/src/structures/MessageAttachment.js index 29add4abc..182fabe8e 100644 --- a/src/structures/MessageAttachment.js +++ b/src/structures/MessageAttachment.js @@ -5,10 +5,12 @@ class MessageAttachment { constructor(message, data) { /** * The Client that instantiated this Message. + * @type {Client} */ this.client = message.client; /** * The message this attachment is part of. + * @type {Message} */ this.message = message; this.setup(data); diff --git a/src/structures/MessageEmbed.js b/src/structures/MessageEmbed.js new file mode 100644 index 000000000..0edc9663d --- /dev/null +++ b/src/structures/MessageEmbed.js @@ -0,0 +1,121 @@ +/** + * Represents a thumbnail for a Message embed + */ +class MessageEmbedThumbnail { + constructor(embed, data) { + /** + * The embed this thumbnail is part of + * @type {MessageEmbed} + */ + this.embed = embed; + this.setup(data); + } + + setup(data) { + /** + * The URL for this thumbnail + * @type {String} + */ + this.url = data.url; + /** + * The Proxy URL for this thumbnail + * @type {String} + */ + this.proxyURL = data.proxy_url; + /** + * The height of the thumbnail + * @type {Number} + */ + this.height = data.height; + /** + * The width of the thumbnail + * @type {Number} + */ + this.width = data.width; + } +} + +/** + * Represents a Provider for a Message embed + */ +class MessageEmbedProvider { + constructor(embed, data) { + /** + * The embed this provider is part of + * @type {MessageEmbed} + */ + this.embed = embed; + this.setup(data); + } + + setup(data) { + /** + * The name of this provider + * @type {String} + */ + this.name = data.name; + /** + * The URL of this provider + * @type {String} + */ + this.url = data.url; + } +} + +/** + * Represents an embed in an image - e.g. preview of image + */ +class MessageEmbed { + constructor(message, data) { + /** + * The message this embed is part of + * @type {Message} + */ + this.message = message; + /** + * The client that instantiated this embed + * @type {Client} + */ + this.client = message.client; + this.setup(data); + } + + setup(data) { + /** + * The title of this embed, if there is one + * @type {?String} + */ + this.title = data.title; + /** + * The type of this embed + * @type {String} + */ + this.type = data.type; + /** + * The description of this embed, if there is one + * @type {?String} + */ + this.description = data.description; + /** + * The URL of this embed + * @type {String} + */ + this.url = data.url; + if (data.thumbnail) { + /** + * The thumbnail of this embed, if there is one + * @type {MessageEmbedThumbnail} + */ + this.thumbnail = new MessageEmbedThumbnail(this, data.thumbnail); + } + if (data.provider) { + /** + * The provider of this embed, if there is one + * @type {MessageEmbedProvider} + */ + this.provider = new MessageEmbedProvider(this, data.provider); + } + } +} + +module.exports = MessageEmbed; From df934eccafaf891ee0a525a748a9d8e4f6303f80 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 29 Aug 2016 16:41:28 +0100 Subject: [PATCH 241/324] Fix voice losing count --- docs/docs.json | 2 +- src/client/voice/dispatcher/StreamDispatcher.js | 8 ++++---- src/client/voice/player/BasePlayer.js | 13 +++++++++++-- src/client/voice/player/DefaultPlayer.js | 1 - 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 4bdaadb05..d1e2cb04b 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472482437361},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":23,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":103,"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":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":126,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":243,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":257,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":272,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":289,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472485293337},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":243,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":257,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":272,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":289,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 59b999fd5..7286e0fb0 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -9,12 +9,15 @@ nonce.fill(0); * @extends {EventEmitter} */ class StreamDispatcher extends EventEmitter { - constructor(player, stream) { + constructor(player, stream, sd) { super(); this.player = player; this.stream = stream; this.streamingData = { channels: 2, + count: sd.count, + sequence: sd.sequence, + timestamp: sd.timestamp, }; this._startStreaming(); this._triggered = false; @@ -151,9 +154,6 @@ class StreamDispatcher extends EventEmitter { this.stream.on('end', e => this._triggerTerminalState('end', e)); this.stream.on('error', e => this._triggerTerminalState('error', e)); const data = this.streamingData; - data.count = 0; - data.sequence = 0; - data.timestamp = 0; data.length = 20; data.missed = 0; data.startTime = Date.now(); diff --git a/src/client/voice/player/BasePlayer.js b/src/client/voice/player/BasePlayer.js index c5fe38ad7..d8f5ff5a2 100644 --- a/src/client/voice/player/BasePlayer.js +++ b/src/client/voice/player/BasePlayer.js @@ -18,6 +18,12 @@ class VoiceConnectionPlayer extends EventEmitter { }); this.speaking = false; this.processMap = new Map(); + this.dispatcher = null; + this._streamingData = { + count: 0, + sequence: 0, + timestamp: 0, + }; } convertStream(stream) { @@ -31,6 +37,7 @@ class VoiceConnectionPlayer extends EventEmitter { } _shutdown() { + this.speaking = false; for (const stream of this.processMap.keys()) { this.killStream(stream); } @@ -38,6 +45,7 @@ class VoiceConnectionPlayer extends EventEmitter { killStream(stream) { const streams = this.processMap.get(stream); + this._streamingData = this.dispatcher.streamingData; this.emit('debug', 'cleaning up streams after end/error'); if (streams) { if (streams.inputStream && streams.pcmConverter) { @@ -77,17 +85,18 @@ class VoiceConnectionPlayer extends EventEmitter { this.connection.websocket.send({ op: Constants.VoiceOPCodes.SPEAKING, d: { - speaking: value, + speaking: true, delay: 0, }, }); } playPCMStream(pcmStream) { - const dispatcher = new StreamDispatcher(this, pcmStream); + const dispatcher = new StreamDispatcher(this, pcmStream, this._streamingData); dispatcher.on('speaking', value => this.setSpeaking(value)); dispatcher.on('end', () => this.killStream(pcmStream)); dispatcher.on('error', () => this.killStream(pcmStream)); + this.dispatcher = dispatcher; return dispatcher; } diff --git a/src/client/voice/player/DefaultPlayer.js b/src/client/voice/player/DefaultPlayer.js index 2f0d64887..383e0668b 100644 --- a/src/client/voice/player/DefaultPlayer.js +++ b/src/client/voice/player/DefaultPlayer.js @@ -4,7 +4,6 @@ const fs = require('fs'); class DefaultPlayer extends BasePlayer { playFile(file) { - this._shutdown(); return this.playStream(fs.createReadStream(file)); } From d9ae732bfd1bceac5d0c0c777e99ac08798c26e4 Mon Sep 17 00:00:00 2001 From: Manuel Kraus Date: Mon, 29 Aug 2016 20:01:05 +0200 Subject: [PATCH 242/324] Add sendFile function (#562) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * sendFile * Add default value to filename * eslint * (╯°□°)╯︵ ┻━┻ --- package.json | 4 +- src/client/ClientDataResolver.js | 39 ++++++++++++++++++++ src/client/rest/APIRequest.js | 8 ++-- src/client/rest/RESTMethods.js | 4 +- src/structures/DMChannel.js | 4 ++ src/structures/GroupDMChannel.js | 4 ++ src/structures/GuildMember.js | 4 ++ src/structures/TextChannel.js | 4 ++ src/structures/User.js | 4 ++ src/structures/interface/TextBasedChannel.js | 21 ++++++++++- 10 files changed, 87 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 033892fd0..a9de93b2c 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,8 @@ "opusscript": "^0.0.1" }, "devDependencies": { - "jsdoc-parse": "^1.2.7", - "fs-extra": "^0.30.0" + "fs-extra": "^0.30.0", + "jsdoc-parse": "^1.2.7" }, "optionalDependencies": { "node-opus": "^0.1.13" diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index b588ff277..040e641e7 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -1,3 +1,7 @@ +const path = require('path'); +const fs = require('fs'); +const request = require('superagent'); + const getStructure = name => require(`../structures/${name}`); const User = getStructure('User'); @@ -163,6 +167,41 @@ class ClientDataResolver { return String(data); } + + /** + * Data that can be resolved to give a Buffer. This can be: + * * A Buffer + * * The path to a local file + * * An URL + * @typedef {String|Buffer} FileResolvable + */ + + /** + * Resolves a FileResolvable to a Buffer + * @param {FileResolvable} fileResolvable the file resolvable to resolve + * @returns {String|Buffer} + */ + resolveFile(resource) { + if ($string(resource)) { + return new Promise((resolve, reject) => { + if (/^https?:\/\//.test(resource)) { + request.get(resource) + .set('Content-Type', 'blob') + .end((err, res) => err ? reject(err) : resolve(res.body)); + } else { + const file = path.resolve(resource); + const stat = fs.statSync(file); + if (!stat.isFile()) { + return reject(new Error(`The file could not be found: ${file}`)); + } + + return resolve(fs.readFileSync(file)); + } + }); + } + + return Promise.resolve(resource); + } } module.exports = ClientDataResolver; diff --git a/src/client/rest/APIRequest.js b/src/client/rest/APIRequest.js index e27e5833c..c56d1ebf1 100644 --- a/src/client/rest/APIRequest.js +++ b/src/client/rest/APIRequest.js @@ -29,12 +29,14 @@ class APIRequest { if (this.auth) { apiRequest.set('authorization', this.getAuth()); } + if (this.file && this.file.file) { + apiRequest.set('Content-Type', 'multipart/form-data'); + apiRequest.attach('file', this.file.file, this.file.name); + } if (this.data) { apiRequest.send(this.data); } - if (this.file) { - apiRequest.attach('file', this.file.file, this.file.name); - } + apiRequest.set('User-Agent', this.rest.userAgentManager.userAgent); return apiRequest; } diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 25166add0..019491d75 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -41,7 +41,7 @@ class RESTMethods { }); } - sendMessage($channel, content, tts, nonce) { + sendMessage($channel, content, tts, nonce, file) { return new Promise((resolve, reject) => { const $this = this; let channel = $channel; @@ -49,7 +49,7 @@ class RESTMethods { function req() { $this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, { content, tts, nonce, - }) + }, file) .then(data => resolve($this.rest.client.actions.MessageCreate.handle(data).m)) .catch(reject); } diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index b591d2c9c..eb56bd25a 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -47,6 +47,10 @@ class DMChannel extends Channel { return; } + sendFile() { + return; + } + _cacheMessage() { return; } diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index 9760c0b10..4505b0fcf 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -124,6 +124,10 @@ class GroupDMChannel extends Channel { return; } + sendFile() { + return; + } + _cacheMessage() { return; } diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 5da424e5f..a40e73f96 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -222,6 +222,10 @@ class GuildMember { sendTTSMessage() { return; } + + sendFile() { + return; + } } TextBasedChannel.applyToClass(GuildMember); diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index c101f1721..3cb0b94d2 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -32,6 +32,10 @@ class TextChannel extends GuildChannel { return; } + sendFile() { + return; + } + _cacheMessage() { return; } diff --git a/src/structures/User.js b/src/structures/User.js index de16f1f8c..4dce49145 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -122,6 +122,10 @@ class User { sendTTSMessage() { return; } + + sendFile() { + return; + } } TextBasedChannel.applyToClass(User); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index e7267279a..c83817015 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -68,7 +68,24 @@ class TextBasedChannel { sendTTSMessage(content, options = {}) { return this.client.rest.methods.sendMessage(this, content, true, options.nonce); } - + /** + * Send a file to this channel + * @param {FileResolvable} attachment The file to send + * @param {String} [fileName="file.jpg"] The name and extension of the file + * @returns {Promise} + */ + sendFile(attachment, fileName = 'file.jpg') { + return new Promise((resolve, reject) => { + this.client.resolver.resolveFile(attachment) + .then(file => { + this.client.rest.methods.sendMessage(this, undefined, false, undefined, { + file, + name: fileName, + }).then(resolve).catch(reject); + }) + .catch(reject); + }); + } /** * The parameters to pass in when requesting previous messages from a channel. `around`, `before` and * `after` are mutually exclusive. All the parameters are optional. @@ -173,7 +190,7 @@ function applyProp(structure, prop) { } exports.applyToClass = (structure, full = false) => { - const props = ['sendMessage', 'sendTTSMessage']; + const props = ['sendMessage', 'sendTTSMessage', 'sendFile']; if (full) { props.push('_cacheMessage'); props.push('getMessages'); From 897cbfec77d73a675e55fe3bb53298260ddd9476 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 29 Aug 2016 19:03:38 +0100 Subject: [PATCH 243/324] Fix leaving guilds if you are the owner --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index d1e2cb04b..9cd3bbcbe 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472485293337},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":243,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":257,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":272,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":289,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":96,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":154,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":23,"file":"ClientDataResolver.js","path":"src/client"}},{"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":51,"file":"ClientDataResolver.js","path":"src/client"}},{"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":69,"file":"ClientDataResolver.js","path":"src/client"}},{"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":98,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":142,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472493830614},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":243,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":257,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":272,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":289,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":89,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 019491d75..c78067f21 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -176,6 +176,9 @@ class RESTMethods { } leaveGuild(guild) { + if (guild.owner.id === this.rest.client.user.id) { + return this.deleteGuild(guild); + } return new Promise((resolve, reject) => { this.rest.makeRequest('del', Constants.Endpoints.meGuild(guild.id), true) .then(() => { From 78e0d88f55e94ec0ae5938bdd5c16a4f6a5f6163 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 29 Aug 2016 19:08:31 +0100 Subject: [PATCH 244/324] Make file resolving non-blocking for local paths --- docs/docs.json | 2 +- src/client/ClientDataResolver.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 9cd3bbcbe..1b9d1c99f 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472493830614},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":243,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":257,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":272,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":289,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":89,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472494116089},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":243,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":257,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":272,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":289,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":89,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index 040e641e7..900784666 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -195,7 +195,12 @@ class ClientDataResolver { return reject(new Error(`The file could not be found: ${file}`)); } - return resolve(fs.readFileSync(file)); + fs.readFile(file, (err, data) => { + if (err) { + return reject(err); + } + resolve(data); + }); } }); } From 1e2e940b981959b18ca14a36e8de7271045dc7ef Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 29 Aug 2016 19:10:00 +0100 Subject: [PATCH 245/324] File resolving can use http too now --- docs/docs.json | 2 +- src/client/ClientDataResolver.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 1b9d1c99f..9d0645734 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472494116089},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":243,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":257,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":272,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":289,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":89,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472494205721},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":243,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":257,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":272,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":289,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":89,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index 900784666..b74d9a19e 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -184,7 +184,7 @@ class ClientDataResolver { resolveFile(resource) { if ($string(resource)) { return new Promise((resolve, reject) => { - if (/^https?:\/\//.test(resource)) { + if (/^http?:\/\//.test(resource)) { request.get(resource) .set('Content-Type', 'blob') .end((err, res) => err ? reject(err) : resolve(res.body)); From 52adb3d8b23182048cd2d0f9326d212326412ceb Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 29 Aug 2016 19:13:42 +0100 Subject: [PATCH 246/324] =?UTF-8?q?undo=20fix=20whoops=20=C2=AF\=5F(?= =?UTF-8?q?=E3=83=84)=5F/=C2=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs.json | 2 +- src/client/ClientDataResolver.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 9d0645734..613c07bf2 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472494205721},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":243,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":257,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":272,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":289,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":89,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472494426901},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":243,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":257,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":272,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":289,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":89,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index b74d9a19e..900784666 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -184,7 +184,7 @@ class ClientDataResolver { resolveFile(resource) { if ($string(resource)) { return new Promise((resolve, reject) => { - if (/^http?:\/\//.test(resource)) { + if (/^https?:\/\//.test(resource)) { request.get(resource) .set('Content-Type', 'blob') .end((err, res) => err ? reject(err) : resolve(res.body)); From 817bea5a706ce6e1feb64e5ea89be410b2efc0ad Mon Sep 17 00:00:00 2001 From: Manuel Kraus Date: Mon, 29 Aug 2016 21:15:41 +0200 Subject: [PATCH 247/324] Add timeout to Message#delete() (#563) --- src/structures/Message.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index e84008dcf..6d6435600 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -233,6 +233,7 @@ class Message { /** * Deletes the message + * @param {Number} [timeout=0] How long to wait to delete the message in milliseconds * @returns {Promise} * @example * // delete a message @@ -240,8 +241,14 @@ class Message { * .then(msg => console.log(`Deleted message from ${msg.author}`)) * .catch(console.log); */ - delete() { - return this.client.rest.methods.deleteMessage(this); + delete(timeout = 0) { + return new Promise((resolve, reject) => { + setTimeout(() => { + this.client.rest.methods.deleteMessage(this) + .then(resolve) + .catch(reject); + }, timeout); + }); } /** From 090234cef2d00916c40890359b55b85e393bf16f Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 29 Aug 2016 22:53:47 +0100 Subject: [PATCH 248/324] Fix guild.owner doc --- docs/docs.json | 2 +- src/structures/Guild.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 613c07bf2..f2956ea89 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472494426901},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the guild","memberof":"Guild","type":{"types":[[["User",""]]]},"meta":{"line":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":243,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":257,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":272,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":289,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":89,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472507632259},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":279,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":288,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":296,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":89,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index e985d3ba8..112c388bc 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -314,7 +314,7 @@ class Guild { /** * The owner of the guild - * @type {User} + * @type {GuildMember} */ this.owner = this.members.get(data.owner_id); From c6688b94e6958bf6047a09031be490d9f08dbd6b Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 29 Aug 2016 22:54:55 +0100 Subject: [PATCH 249/324] add guildmember.nickname to docs --- docs/docs.json | 2 +- src/structures/GuildMember.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index f2956ea89..254b1b9a3 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472507632259},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":193,"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":201,"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":214,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":81,"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":104,"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":113,"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":122,"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":131,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":279,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":288,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":296,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":89,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472507701021},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":279,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":288,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":296,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":89,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index a40e73f96..640f9b3d1 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -69,6 +69,10 @@ class GuildMember { * @type {?Boolean} */ this.speaking = this.speaking; + /** + * The nickname of this Guild Member, if they have one + * @type {?String} + */ this.nickname = data.nick; this._roles = data.roles; } From 4f130a1a58d2447e8b38f4c08bdff661870f8967 Mon Sep 17 00:00:00 2001 From: Hyper-Coder Date: Tue, 30 Aug 2016 04:43:03 -0400 Subject: [PATCH 250/324] Fixed sendFile (#565) https://images.typicalbot.com/i/57c4dcc5d74b7.png --- src/structures/interface/TextBasedChannel.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index c83817015..01a52a04e 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -1,5 +1,6 @@ const Collection = require('../../util/Collection'); const Message = require('../Message'); +const path = require('path'); /** * Interface for classes that have text-channel-like features @@ -74,7 +75,16 @@ class TextBasedChannel { * @param {String} [fileName="file.jpg"] The name and extension of the file * @returns {Promise} */ - sendFile(attachment, fileName = 'file.jpg') { + sendFile(attachment, fileName) { + if (!fileName) { + if (attachment instanceof String || 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 => { From 60a1ba308880bd099e5a5d25cbe6528d2c415756 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 30 Aug 2016 04:46:40 -0400 Subject: [PATCH 251/324] Fix Collection.exists (#566) --- src/util/Collection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Collection.js b/src/util/Collection.js index e1e682be9..3f706728d 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -114,7 +114,7 @@ class Collection extends Map { * } */ exists(key, value) { - return Boolean(this.get(key, value)); + return Boolean(this.find(key, value)); } _arrayMethod(method, args) { From 56352220afe29359f734f1ed76422dfbaf6e7aea Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 30 Aug 2016 04:47:11 -0400 Subject: [PATCH 252/324] Make Collection.find and findAll use .values() (#567) * Make Collection.find and findAll use .values() * Make Collection.deleteAll use .values() --- src/util/Collection.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/Collection.js b/src/util/Collection.js index 3f706728d..f33053a33 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -51,7 +51,7 @@ class Collection extends Map { */ deleteAll() { const returns = []; - for (const item of this.array()) { + for (const item of this.values()) { if (item.delete) { returns.push(item.delete()); } @@ -78,7 +78,7 @@ class Collection extends Map { */ findAll(key, value) { const results = []; - for (const item of this.array()) { + for (const item of this.values()) { if (item[key] === value) { results.push(item); } @@ -95,7 +95,7 @@ class Collection extends Map { * collection.get('id', '123123...'); */ find(key, value) { - for (const item of this.array()) { + for (const item of this.values()) { if (item[key] === value) { return item; } From d249aa10cc437bd7fed7de3cb702ed059ab2fd8a Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 30 Aug 2016 13:05:50 +0100 Subject: [PATCH 253/324] Add client.destroy(); --- docs/docs.json | 2 +- src/client/Client.js | 28 +++++++++++++++++++ src/client/ClientManager.js | 15 ++++++++-- src/client/actions/ChannelDelete.js | 5 +--- src/client/actions/GuildDelete.js | 6 +--- src/client/actions/GuildMemberRemove.js | 6 +--- src/client/actions/GuildRoleDelete.js | 6 +--- src/client/actions/MessageDelete.js | 7 ++--- src/client/rest/RESTMethods.js | 4 +++ src/client/rest/RequestHandlers/Sequential.js | 4 +-- src/client/voice/VoiceConnectionWebSocket.js | 2 +- .../voice/dispatcher/StreamDispatcher.js | 6 ++-- src/client/websocket/WebSocketManager.js | 13 ++++++--- .../websocket/packets/handlers/TypingStart.js | 2 +- src/structures/Guild.js | 2 +- src/structures/Message.js | 2 +- src/structures/interface/TextBasedChannel.js | 2 +- test/random.js | 4 ++- 18 files changed, 74 insertions(+), 42 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 254b1b9a3..52d256366 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472507701021},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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#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":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":154,"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":31,"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":49,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":50,"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":32,"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":47,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":194,"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":237,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":15,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":15,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":279,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":288,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":296,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":15,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":8,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":54,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":77,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":141,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":15,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":89,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472558756946},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":172,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":199,"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":242,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":279,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":288,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":296,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 414efa206..3cfb3b414 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -105,6 +105,8 @@ class Client extends EventEmitter { * @type {?Number} */ this.readyTime = null; + this._intervals = []; + this._timeouts = []; } /** @@ -135,6 +137,32 @@ class Client extends EventEmitter { return this.rest.methods.loginToken(email); } + /** + * Destroys the client and logs out. Resolves with null if successful. + * @returns {Promise} + */ + destroy() { + return new Promise((resolve, reject) => { + this.manager.destroy().then(() => { + this._intervals.map(i => clearInterval(i)); + this._timeouts.map(t => clearTimeout(t)); + this.token = null; + this.email = null; + this.password = null; + resolve(); + }) + .catch(reject); + }); + } + + setInterval(...params) { + this._intervals.push(setInterval(...params)); + } + + setTimeout(...params) { + this._timeouts.push(setTimeout(...params)); + } + /** * Caches a user, or obtains it from the cache if it's already cached. * If the user isn't already cached, it will only be obtainable by OAuth bot accounts. diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index 718fa1852..4a892dddf 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -35,7 +35,7 @@ class ClientManager { }) .catch(reject); - setTimeout(() => reject(Constants.Errors.TOOK_TOO_LONG), 1000 * 300); + this.client.setTimeout(() => reject(Constants.Errors.TOOK_TOO_LONG), 1000 * 300); } /** @@ -44,13 +44,24 @@ class ClientManager { * @returns {null} */ setupKeepAlive(time) { - this.heartbeatInterval = setInterval(() => { + this.heartbeatInterval = this.client.setInterval(() => { this.client.ws.send({ op: Constants.OPCodes.HEARTBEAT, d: Date.now(), }); }, time); } + + destroy() { + return new Promise((resolve) => { + if (!this.client.user.bot) { + this.client.rest.methods.logout().then(resolve); + } else { + this.client.ws.destroy(); + resolve(); + } + }); + } } module.exports = ClientManager; diff --git a/src/client/actions/ChannelDelete.js b/src/client/actions/ChannelDelete.js index e740a11a0..d56296c2e 100644 --- a/src/client/actions/ChannelDelete.js +++ b/src/client/actions/ChannelDelete.js @@ -26,10 +26,7 @@ class ChannelDeleteAction extends Action { } scheduleForDeletion(id) { - this.timeouts.push( - setTimeout(() => delete this.deleted[id], - this.client.options.rest_ws_bridge_timeout) - ); + this.client.setTimeout(() => delete this.deleted[id], this.client.options.rest_ws_bridge_timeout); } } diff --git a/src/client/actions/GuildDelete.js b/src/client/actions/GuildDelete.js index e11beda46..4716b85b1 100644 --- a/src/client/actions/GuildDelete.js +++ b/src/client/actions/GuildDelete.js @@ -6,7 +6,6 @@ class GuildDeleteAction extends Action { constructor(client) { super(client); this.deleted = {}; - this.timeouts = []; } handle(data) { @@ -39,10 +38,7 @@ class GuildDeleteAction extends Action { } scheduleForDeletion(id) { - this.timeouts.push( - setTimeout(() => delete this.deleted[id], - this.client.options.rest_ws_bridge_timeout) - ); + this.client.setTimeout(() => delete this.deleted[id], this.client.options.rest_ws_bridge_timeout) } } diff --git a/src/client/actions/GuildMemberRemove.js b/src/client/actions/GuildMemberRemove.js index 01e45fa94..ab5290dc2 100644 --- a/src/client/actions/GuildMemberRemove.js +++ b/src/client/actions/GuildMemberRemove.js @@ -5,7 +5,6 @@ class GuildMemberRemoveAction extends Action { constructor(client) { super(client); - this.timeouts = []; this.deleted = {}; } @@ -39,10 +38,7 @@ class GuildMemberRemoveAction extends Action { } scheduleForDeletion(guildID, userID) { - this.timeouts.push( - setTimeout(() => delete this.deleted[guildID + userID], - this.client.options.rest_ws_bridge_timeout) - ); + this.client.setTimeout(() => delete this.deleted[guildID + userID], this.client.options.rest_ws_bridge_timeout); } } diff --git a/src/client/actions/GuildRoleDelete.js b/src/client/actions/GuildRoleDelete.js index 078cdcbb7..584077101 100644 --- a/src/client/actions/GuildRoleDelete.js +++ b/src/client/actions/GuildRoleDelete.js @@ -5,7 +5,6 @@ class GuildRoleDeleteAction extends Action { constructor(client) { super(client); - this.timeouts = []; this.deleted = {}; } @@ -37,10 +36,7 @@ class GuildRoleDeleteAction extends Action { } scheduleForDeletion(guildID, roleID) { - this.timeouts.push( - setTimeout(() => delete this.deleted[guildID + roleID], - this.client.options.rest_ws_bridge_timeout) - ); + this.client.setTimeout(() => delete this.deleted[guildID + roleID], this.client.options.rest_ws_bridge_timeout) } } diff --git a/src/client/actions/MessageDelete.js b/src/client/actions/MessageDelete.js index 501058478..c9cbbfafc 100644 --- a/src/client/actions/MessageDelete.js +++ b/src/client/actions/MessageDelete.js @@ -4,7 +4,6 @@ class MessageDeleteAction extends Action { constructor(client) { super(client); - this.timeouts = []; this.deleted = {}; } @@ -33,10 +32,8 @@ class MessageDeleteAction extends Action { } scheduleForDeletion(channelID, messageID) { - this.timeouts.push( - setTimeout(() => delete this.deleted[channelID + messageID], - this.client.options.rest_ws_bridge_timeout) - ); + this.client.setTimeout( + () => delete this.deleted[channelID + messageID], this.client.options.rest_ws_bridge_timeout); } } diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index c78067f21..517b69e86 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -30,6 +30,10 @@ class RESTMethods { }); } + logout() { + return this.rest.makeRequest('post', Constants.Endpoints.logout, true); + } + getGateway() { return new Promise((resolve, reject) => { this.rest.makeRequest('get', Constants.Endpoints.gateway, true) diff --git a/src/client/rest/RequestHandlers/Sequential.js b/src/client/rest/RequestHandlers/Sequential.js index 5efe1aee4..40c813553 100644 --- a/src/client/rest/RequestHandlers/Sequential.js +++ b/src/client/rest/RequestHandlers/Sequential.js @@ -53,7 +53,7 @@ class SequentialRequestHandler extends RequestHandler { } if (err) { if (err.status === 429) { - setTimeout(() => { + this.restManager.client.setTimeout(() => { this.waiting = false; this.globalLimit = false; resolve(); @@ -73,7 +73,7 @@ class SequentialRequestHandler extends RequestHandler { const data = res && res.body ? res.body : {}; item.resolve(data); if (this.requestRemaining === 0) { - setTimeout(() => { + this.restManager.client.setTimeout(() => { this.waiting = false; resolve(data); }, (this.requestResetTime - Date.now()) + this.timeDifference + 1000); diff --git a/src/client/voice/VoiceConnectionWebSocket.js b/src/client/voice/VoiceConnectionWebSocket.js index 91df129ad..44590d2f8 100644 --- a/src/client/voice/VoiceConnectionWebSocket.js +++ b/src/client/voice/VoiceConnectionWebSocket.js @@ -66,7 +66,7 @@ class VoiceConnectionWebSocket extends EventEmitter { } _setHeartbeat(interval) { - this.heartbeat = setInterval(() => { + this.heartbeat = this.voiceConnection.manager.client.setInterval(() => { this.send({ op: Constants.VoiceOPCodes.HEARTBEAT, d: null, diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 7286e0fb0..e692fb44a 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -70,7 +70,7 @@ class StreamDispatcher extends EventEmitter { } if (this.paused) { data.timestamp = (data.timestamp + 4294967295) ? data.timestamp + 960 : 0; - return setTimeout(() => this._send(), data.length * 10); + return this.player.connection.manager.client.setTimeout(() => this._send(), data.length * 10); } const bufferLength = 1920 * data.channels; this._setSpeaking(true); @@ -78,7 +78,7 @@ class StreamDispatcher extends EventEmitter { if (!buffer) { data.missed++; - return setTimeout(() => this._send(), data.length * 10); + return this.player.connection.manager.client.setTimeout(() => this._send(), data.length * 10); } data.missed = 0; @@ -97,7 +97,7 @@ class StreamDispatcher extends EventEmitter { const nextTime = data.startTime + (data.count * data.length); - setTimeout(() => this._send(), data.length + (nextTime - Date.now())); + this.player.connection.manager.client.setTimeout(() => this._send(), data.length + (nextTime - Date.now())); } catch (e) { this._triggerTerminalState('error', e); } diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index f8dc9d1e0..5e711cfdb 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -76,11 +76,17 @@ class WebSocketManager { this.doQueue(); } + destroy() { + this.ws.close(1000); + this._queue = []; + this.status = Constants.Status.IDLE; + } + doQueue() { const item = this._queue[0]; if (this.ws.readyState === WebSocket.OPEN && item) { if (this._remaining === 0) { - return setTimeout(() => { + return this.client.setTimeout(() => { this.doQueue(); }, 1000); } @@ -88,7 +94,7 @@ class WebSocketManager { this.ws.send(item); this._queue.shift(); this.doQueue(); - setTimeout(() => this._remaining++, 1000); + this.client.setTimeout(() => this._remaining++, 1000); } } @@ -144,11 +150,10 @@ class WebSocketManager { * @returns {null} */ eventClose(event) { - console.log(event.code); if (event.code === 4004) { throw Constants.Errors.BAD_LOGIN; } - if (!this.reconnecting) { + if (!this.reconnecting && event.code !== 1000) { this.tryReconnect(); } } diff --git a/src/client/websocket/packets/handlers/TypingStart.js b/src/client/websocket/packets/handlers/TypingStart.js index 599021112..f751bfb4d 100644 --- a/src/client/websocket/packets/handlers/TypingStart.js +++ b/src/client/websocket/packets/handlers/TypingStart.js @@ -28,7 +28,7 @@ class TypingStartHandler extends AbstractHandler { const timestamp = new Date(data.timestamp * 1000); function tooLate() { - return setTimeout(() => { + return client.setTimeout(() => { client.emit(Constants.Events.TYPING_STOP, channel, user, channel.typingMap[user.id]); delete channel.typingMap[user.id]; }, 6000); diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 112c388bc..76b33270e 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -599,7 +599,7 @@ class Guild { }, }); this._checkChunks(); - setTimeout(() => reject(new Error('members not here in time')), 120 * 1000); + this.client.setTimeout(() => reject(new Error('members not here in time')), 120 * 1000); }); } diff --git a/src/structures/Message.js b/src/structures/Message.js index 6d6435600..ef15f05d1 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -243,7 +243,7 @@ class Message { */ delete(timeout = 0) { return new Promise((resolve, reject) => { - setTimeout(() => { + this.client.setTimeout(() => { this.client.rest.methods.deleteMessage(this) .then(resolve) .catch(reject); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 01a52a04e..7554722aa 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -151,7 +151,7 @@ class TextBasedChannel { setTyping(typing) { clearInterval(this.client.user._typing.get(this.id)); if (typing) { - this.client.user._typing.set(this.id, setInterval(() => { + this.client.user._typing.set(this.id, this.client.setInterval(() => { this.client.rest.methods.sendTyping(this.id); }, 4000)); this.client.rest.methods.sendTyping(this.id); diff --git a/test/random.js b/test/random.js index 01700ef45..3ec5fc956 100644 --- a/test/random.js +++ b/test/random.js @@ -6,7 +6,9 @@ const fs = require('fs'); const client = new Discord.Client({ fetch_all_members: false }); -client.login(require('./auth.json').token).then(token => console.log('logged in with token ' + token)).catch(console.log); +const { email, password, token } = require('./auth.json'); + +client.login(token).then(atoken => console.log('logged in with token ' + atoken)).catch(console.log); client.on('ready', () => { console.log('ready!'); From 0860d5210be0b32d9f3ffad78fb6f5d841474eff Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 30 Aug 2016 13:40:39 +0100 Subject: [PATCH 254/324] Add message.member if available --- docs/docs.json | 2 +- src/structures/Message.js | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 52d256366..dea9ce46d 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472558756946},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":172,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":199,"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":242,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":209,"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#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.log);"],"meta":{"line":244,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":264,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":279,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":288,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":296,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":44,"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":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":54,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":59,"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#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":69,"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":74,"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":79,"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":84,"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":96,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":105,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472560844081},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":172,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":199,"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":242,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":220,"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#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.log);"],"meta":{"line":255,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":275,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":299,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":307,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/Message.js b/src/structures/Message.js index ef15f05d1..8c4043c93 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -46,6 +46,14 @@ class Message { * The content of the message * @type {String} */ + if (this.guild) { + /** + * Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild + * where the author is still a member. + * @type {GuildMember} + */ + this.member = this.guild.member(this.author); + } this.content = data.content; /** * When the message was sent @@ -137,6 +145,9 @@ class Message { patch(data) { if (data.author) { this.author = this.client.users.get(data.author.id); + if (this.guild) { + this.member = this.guild.member(this.author); + } } if (data.content) { this.content = data.content; From 907c1ed9f98a3d39469cb1bacf49ff06e7f0f53e Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 30 Aug 2016 13:47:47 +0100 Subject: [PATCH 255/324] Add message.system --- docs/docs.json | 2 +- src/structures/Message.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index dea9ce46d..ef8768978 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472560844081},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":172,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":199,"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":242,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":220,"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#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.log);"],"meta":{"line":255,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":275,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":299,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":307,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472561272550},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":172,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":199,"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":242,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/structures/Message.js b/src/structures/Message.js index 8c4043c93..74fd5f074 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -140,6 +140,15 @@ class Message { } } } + + /** + * Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications) + * @type {Boolean} + */ + this.system = false; + if (data.type === 6) { + this.system = true; + } } patch(data) { @@ -170,6 +179,12 @@ class Message { if (data.embeds) { this.embeds = data.embeds.map(e => new Embed(this, e)); } + if (data.type > -1) { + this.system = false; + if (data.type === 6) { + this.system = true; + } + } if (data.attachments) { this.attachments = new Collection(); for (const attachment of data.attachments) { From 49d525109fc550b53f46191224ced1e36efffafd Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 30 Aug 2016 13:55:50 +0100 Subject: [PATCH 256/324] Fix ESLint --- docs/docs.json | 2 +- src/client/actions/GuildDelete.js | 2 +- src/client/actions/GuildRoleDelete.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index ef8768978..8cf9f7a3f 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472561272550},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":172,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":199,"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":242,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472561755744},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":172,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":199,"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":242,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/actions/GuildDelete.js b/src/client/actions/GuildDelete.js index 4716b85b1..7f21c25e0 100644 --- a/src/client/actions/GuildDelete.js +++ b/src/client/actions/GuildDelete.js @@ -38,7 +38,7 @@ class GuildDeleteAction extends Action { } scheduleForDeletion(id) { - this.client.setTimeout(() => delete this.deleted[id], this.client.options.rest_ws_bridge_timeout) + this.client.setTimeout(() => delete this.deleted[id], this.client.options.rest_ws_bridge_timeout); } } diff --git a/src/client/actions/GuildRoleDelete.js b/src/client/actions/GuildRoleDelete.js index 584077101..55f3043e4 100644 --- a/src/client/actions/GuildRoleDelete.js +++ b/src/client/actions/GuildRoleDelete.js @@ -36,7 +36,7 @@ class GuildRoleDeleteAction extends Action { } scheduleForDeletion(guildID, roleID) { - this.client.setTimeout(() => delete this.deleted[guildID + roleID], this.client.options.rest_ws_bridge_timeout) + this.client.setTimeout(() => delete this.deleted[guildID + roleID], this.client.options.rest_ws_bridge_timeout); } } From 680ac48e3d82603bafbc6de8fc1230a1a35d7b88 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 30 Aug 2016 14:06:11 +0100 Subject: [PATCH 257/324] Emit error instead of console.log --- docs/docs.json | 2 +- src/client/websocket/WebSocketManager.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 8cf9f7a3f..4e683899c 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472561755744},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":172,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":199,"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":242,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472562376453},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":172,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 5e711cfdb..fb3dd1dbd 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -191,7 +191,12 @@ class WebSocketManager { * @returns {null} */ eventError(e) { - console.log(e); + /** + * Emitted whenever the Client encounters a serious connection error + * @event Client#error + * @param {Error} error the encountered error + */ + this.client.emit('error', e); this.tryReconnect(); } From 4f41a86dd37559c2501c89a241bb3e07a0a89715 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 30 Aug 2016 14:20:28 +0100 Subject: [PATCH 258/324] Clear timeout IDs from array after execution --- docs/docs.json | 2 +- src/client/Client.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 4e683899c..7c476ea8f 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472562376453},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":172,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472563233437},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":178,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":188,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 3cfb3b414..fcc4907cb 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -149,6 +149,8 @@ class Client extends EventEmitter { this.token = null; this.email = null; this.password = null; + this._timeouts = []; + this._intervals = []; resolve(); }) .catch(reject); @@ -160,7 +162,11 @@ class Client extends EventEmitter { } setTimeout(...params) { - this._timeouts.push(setTimeout(...params)); + const restParams = params.slice(1); + this._timeouts.push(setTimeout(() => { + this._timeouts.splice(this._timeouts.indexOf(params[0]), 1); + params[0](); + }, ...restParams)); } /** From 39f969c7779d96a926b4a87e6eb05ed6301e3ee4 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 30 Aug 2016 14:56:33 +0100 Subject: [PATCH 259/324] Update docs --- docs/custom/documents/getting_started.md | 16 +++++++++++ docs/custom/getting_started.js | 34 +++--------------------- docs/docs.json | 2 +- 3 files changed, 21 insertions(+), 31 deletions(-) create mode 100644 docs/custom/documents/getting_started.md diff --git a/docs/custom/documents/getting_started.md b/docs/custom/documents/getting_started.md new file mode 100644 index 000000000..c66cd635d --- /dev/null +++ b/docs/custom/documents/getting_started.md @@ -0,0 +1,16 @@ +

+ + discord.js + +

+ +[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest) + +[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/) + +# Welcome! +Welcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more +stable and performance-friendly than previous versions. + +## Installation +`npm i --save hydrabolt/discord.js#indev-rewrite` \ No newline at end of file diff --git a/docs/custom/getting_started.js b/docs/custom/getting_started.js index 3dc7a00d8..44577c313 100644 --- a/docs/custom/getting_started.js +++ b/docs/custom/getting_started.js @@ -1,33 +1,7 @@ +const fs = require('fs'); + module.exports = { category: 'General', - name: 'Getting Started', - data: -`# Welcome! -discord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API. - -## Installation -To install discord.js from npm: -\`\`\`bash -npm i --save discord.js -\`\`\` - -To install discord.js from the master branch: -\`\`\`bash -npm i --save hydrabolt/discord.js -\`\`\` - -To install discord.js from the development branch: -\`\`\`bash -npm i --save hydrabolt/discord.js#indev -\`\`\` - -To install discord.js from the rewrite branch: -\`\`\`bash -npm i --save hydrabolt/discord.js#indev-rewrite -\`\`\` - -## Tutorials -LuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js. -It's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html) -`, + name: 'Welcome', + data: fs.readFileSync('./docs/custom/documents/getting_started.md').toString('utf-8'), }; diff --git a/docs/docs.json b/docs/docs.json index 7c476ea8f..aca50b3a3 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472563233437},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":178,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":188,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Getting Started","data":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n\n## Tutorials\nLuckyEvie, a helper in the discord.js channel, has put together a great tutorial on getting to grips with discord.js.\nIt's worth a read and you can find it [here.](https://eslachance.gitbooks.io/discord-js-bot-guide/content/samples/selfbots,_the_awesomest_thing_in_the_universe.html)\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472565399412},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":178,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":188,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"}],"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```"}]}} \ No newline at end of file From 4df7968630ba40936c1a20b4ae1dc3095d16a965 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 30 Aug 2016 15:06:18 +0100 Subject: [PATCH 260/324] Add updating file --- docs/custom/documents/updating.md | 11 +++++++++++ .../documents/{getting_started.md => welcome.md} | 0 docs/custom/index.js | 3 ++- docs/custom/updating.js | 7 +++++++ docs/custom/{getting_started.js => welcome.js} | 2 +- docs/docs.json | 2 +- 6 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 docs/custom/documents/updating.md rename docs/custom/documents/{getting_started.md => welcome.md} (100%) create mode 100644 docs/custom/updating.js rename docs/custom/{getting_started.js => welcome.js} (50%) diff --git a/docs/custom/documents/updating.md b/docs/custom/documents/updating.md new file mode 100644 index 000000000..78fa39bc5 --- /dev/null +++ b/docs/custom/documents/updating.md @@ -0,0 +1,11 @@ +# About the Rewrite +The rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable. +It's been written completely from scratch and should be much more stable, fixing caching issues that affected +older versions and it also has support for new Discord Features, such as emojis. + +## Upgrading your code +The rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved +from the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full +extent of these changes by looking at the classes in the documentation. + +Additionally, some event names and parameters have changed - you should revisit these. \ No newline at end of file diff --git a/docs/custom/documents/getting_started.md b/docs/custom/documents/welcome.md similarity index 100% rename from docs/custom/documents/getting_started.md rename to docs/custom/documents/welcome.md diff --git a/docs/custom/index.js b/docs/custom/index.js index fbffd6d8d..a2203b2c2 100644 --- a/docs/custom/index.js +++ b/docs/custom/index.js @@ -1,5 +1,6 @@ const files = [ - require('./getting_started'), + require('./welcome'), + require('./updating'), require('./ping_pong'), ]; diff --git a/docs/custom/updating.js b/docs/custom/updating.js new file mode 100644 index 000000000..1615d95cd --- /dev/null +++ b/docs/custom/updating.js @@ -0,0 +1,7 @@ +const fs = require('fs'); + +module.exports = { + category: 'General', + name: 'Updating your code', + data: fs.readFileSync('./docs/custom/documents/updating.md').toString('utf-8'), +}; diff --git a/docs/custom/getting_started.js b/docs/custom/welcome.js similarity index 50% rename from docs/custom/getting_started.js rename to docs/custom/welcome.js index 44577c313..809093e7e 100644 --- a/docs/custom/getting_started.js +++ b/docs/custom/welcome.js @@ -3,5 +3,5 @@ const fs = require('fs'); module.exports = { category: 'General', name: 'Welcome', - data: fs.readFileSync('./docs/custom/documents/getting_started.md').toString('utf-8'), + data: fs.readFileSync('./docs/custom/documents/welcome.md').toString('utf-8'), }; diff --git a/docs/docs.json b/docs/docs.json index aca50b3a3..edf3cd47a 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472565399412},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":178,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":188,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472565983739},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":178,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":188,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file From c70dfa83fb4281ddba0315790301e310bb8a5358 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 30 Aug 2016 17:26:25 +0100 Subject: [PATCH 261/324] Add ShardManager --- docs/docs.json | 2 +- src/client/websocket/WebSocketManager.js | 3 +-- src/index.js | 2 ++ src/sharding/ShardingManager.js | 34 ++++++++++++++++++++++++ test/shard.js | 24 +++++++++++++++++ test/sharder.js | 5 ++++ 6 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 src/sharding/ShardingManager.js create mode 100644 test/shard.js create mode 100644 test/sharder.js diff --git a/docs/docs.json b/docs/docs.json index edf3cd47a..7e7d9d7d4 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472565983739},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":178,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":188,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472574392251},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":178,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":188,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":193,"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":203,"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":246,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index fb3dd1dbd..75c4e4dbb 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -136,9 +136,8 @@ class WebSocketManager { const payload = this.client.options.ws; payload.token = this.client.token; if (this.client.options.shard_count > 0) { - payload.shard = [this.client.options.shard_id, this.client.options.shard_count]; + payload.shard = [Number(this.client.options.shard_id), Number(this.client.options.shard_count)]; } - this.send({ op: Constants.OPCodes.IDENTIFY, d: payload, diff --git a/src/index.js b/src/index.js index 411d7aca6..7804bd0e7 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,5 @@ const Client = require('./client/Client'); +const ShardingManager = require('./sharding/ShardingManager'); exports.Client = Client; +exports.ShardingManager = ShardingManager; diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js new file mode 100644 index 000000000..5ed08ed65 --- /dev/null +++ b/src/sharding/ShardingManager.js @@ -0,0 +1,34 @@ +const childProcess = require('child_process'); +const path = require('path'); +const EventEmitter = require('events').EventEmitter; + +class ShardingManager extends EventEmitter { + constructor(file, totalShards) { + super(); + this.file = file; + if (!path.isAbsolute(file)) { + this.file = path.resolve(`${process.cwd()}${file}`); + } + this.totalShards = totalShards; + this.runningShards = 0; + this.createShards(); + } + + createShard(id) { + const shard = childProcess.fork(path.resolve(this.file), [id, this.totalShards]); + this.emit('launch', id, shard); + } + + createShards() { + this.createShard(0); + const interval = setInterval(() => { + this.runningShards++; + if (this.runningShards === this.totalShards) { + return clearInterval(interval); + } + this.createShard(this.runningShards); + }, 5500); + } +} + +module.exports = ShardingManager; diff --git a/test/shard.js b/test/shard.js new file mode 100644 index 000000000..80f79839a --- /dev/null +++ b/test/shard.js @@ -0,0 +1,24 @@ +const Discord = require('../'); +const { token } = require('./auth.json'); + +const client = new Discord.Client({ + shard_id: process.argv[2], + shard_count: process.argv[3], +}); + +client.on('message', msg => { + if (msg.content.startsWith('?eval') && msg.author.id === '66564597481480192') { + try { + const com = eval(msg.content.split(' ').slice(1).join(' ')); + msg.channel.sendMessage('```\n' + com + '```'); + } catch (e) { + msg.channel.sendMessage('```\n' + e + '```'); + } + } +}); + +client.on('ready', () => { + console.log('Ready'); +}); + +client.login(token).catch(console.log); diff --git a/test/sharder.js b/test/sharder.js new file mode 100644 index 000000000..65aff063e --- /dev/null +++ b/test/sharder.js @@ -0,0 +1,5 @@ +const Discord = require('../'); + +const sharder = new Discord.ShardingManager(`${process.cwd()}/test/shard.js`, 5); + +sharder.on('launch', id => console.log(`launched ${id}`)); From bce3cd2b8ba61a72a8e1bbd34ec87dcc17d49bb0 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 30 Aug 2016 13:20:20 -0400 Subject: [PATCH 262/324] Add key/value validation to Collection.find/findAll (#569) * Add key/value validation to Collection.find/findAll * Fix ESLint errors --- src/util/Collection.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/Collection.js b/src/util/Collection.js index f33053a33..67168cb24 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -77,6 +77,8 @@ class Collection extends Map { * collection.getAll('username', 'Bob'); */ findAll(key, value) { + if (typeof key !== 'string') throw new TypeError('key must be a string'); + if (typeof value === 'undefined') throw new Error('value must be specified'); const results = []; for (const item of this.values()) { if (item[key] === value) { @@ -95,6 +97,8 @@ class Collection extends Map { * collection.get('id', '123123...'); */ find(key, value) { + if (typeof key !== 'string') throw new TypeError('key must be a string'); + if (typeof value === 'undefined') throw new Error('value must be specified'); for (const item of this.values()) { if (item[key] === value) { return item; From cde3bcb3bd062bbd2cb913fea91f8ac04980a7a5 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 30 Aug 2016 19:07:05 +0100 Subject: [PATCH 263/324] Tidy up shards a bit --- docs/docs.json | 2 +- src/sharding/ShardingManager.js | 20 +++++++++++--------- test/shard.js | 2 ++ test/sharder.js | 4 +++- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 7e7d9d7d4..55561c5f7 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472574392251},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":178,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":188,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":193,"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":203,"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":246,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472580433124},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":178,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":188,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":193,"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":203,"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":246,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 5ed08ed65..90ec133ae 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -1,6 +1,7 @@ const childProcess = require('child_process'); const path = require('path'); const EventEmitter = require('events').EventEmitter; +const Collection = require('../util/Collection'); class ShardingManager extends EventEmitter { constructor(file, totalShards) { @@ -10,23 +11,24 @@ class ShardingManager extends EventEmitter { this.file = path.resolve(`${process.cwd()}${file}`); } this.totalShards = totalShards; - this.runningShards = 0; - this.createShards(); + this.shards = new Collection(); } - createShard(id) { - const shard = childProcess.fork(path.resolve(this.file), [id, this.totalShards]); + createShard() { + const id = this.shards.size; + const shard = childProcess.fork(path.resolve(this.file), [id, this.totalShards], { silent: true }); + this.shards.set(id, shard); this.emit('launch', id, shard); } - createShards() { - this.createShard(0); + spawn(amount) { + this.totalShards = amount; + this.createShard(); const interval = setInterval(() => { - this.runningShards++; - if (this.runningShards === this.totalShards) { + if (this.shards.size === this.totalShards) { return clearInterval(interval); } - this.createShard(this.runningShards); + this.createShard(); }, 5500); } } diff --git a/test/shard.js b/test/shard.js index 80f79839a..8ae8633ba 100644 --- a/test/shard.js +++ b/test/shard.js @@ -17,6 +17,8 @@ client.on('message', msg => { } }); +process.send(123); + client.on('ready', () => { console.log('Ready'); }); diff --git a/test/sharder.js b/test/sharder.js index 65aff063e..5a1340620 100644 --- a/test/sharder.js +++ b/test/sharder.js @@ -1,5 +1,7 @@ const Discord = require('../'); -const sharder = new Discord.ShardingManager(`${process.cwd()}/test/shard.js`, 5); +const sharder = new Discord.ShardingManager(`${process.cwd()}/test/shard.js`); sharder.on('launch', id => console.log(`launched ${id}`)); + +sharder.spawn(5); From f02cc27735eaa79c4fc72a4ec6c9f637029999f1 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 30 Aug 2016 14:31:14 -0400 Subject: [PATCH 264/324] Fix ClientDataManager.killUser (#572) --- src/client/ClientDataManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/ClientDataManager.js b/src/client/ClientDataManager.js index ad7c0285c..62924904e 100644 --- a/src/client/ClientDataManager.js +++ b/src/client/ClientDataManager.js @@ -84,7 +84,7 @@ class ClientDataManager { } killUser(user) { - this.users.delete(user.id); + this.client.users.delete(user.id); } killChannel(channel) { From dbda589088c695fcb6a9b15be2f0f7c311d66748 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Wed, 31 Aug 2016 05:05:15 -0400 Subject: [PATCH 265/324] Massively improve performance of message caching (#573) --- src/structures/interface/TextBasedChannel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 7554722aa..cd30fbfe4 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -166,7 +166,7 @@ class TextBasedChannel { } if (this.messages.size >= maxSize) { - this.messages.delete(Array.from(this.messages.keys())[0]); + this.messages.delete(this.messages.keys().next().value); } this.messages.set(message.id, message); From 8c3ae2fd9078d9fa325c4b16afd6c5535dd4f9ce Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 31 Aug 2016 13:36:05 +0100 Subject: [PATCH 266/324] work on sharding --- src/sharding/Shard.js | 29 +++++++++++++++++++++++++++++ src/sharding/ShardingManager.js | 5 ++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 src/sharding/Shard.js diff --git a/src/sharding/Shard.js b/src/sharding/Shard.js new file mode 100644 index 000000000..af71d23b5 --- /dev/null +++ b/src/sharding/Shard.js @@ -0,0 +1,29 @@ +const childProcess = require('child_process'); +const path = require('path'); +const crypto = require('crypto'); + +class Shard { + constructor(manager, id) { + this.manager = manager; + this.id = id; + this.process = childProcess.fork(path.resolve(this.manager.file), [id, this.manager.shards.size], { silent: true }); + this.process.on('message', m => { + if (m && m.type && m.id) { + + } + }); + } + + send(type, timeout = 60000, data = {}) { + return new Promise((resolve, reject) => { + const id = crypto.randomBytes(16).toString('hex'); + this.process.send({ + type, + id, + data, + }); + }); + } +} + +module.exports = Shard; diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 90ec133ae..ea7bcd1f2 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -2,6 +2,8 @@ const childProcess = require('child_process'); const path = require('path'); const EventEmitter = require('events').EventEmitter; const Collection = require('../util/Collection'); +const Shard = require('./Shard'); +const crypto = require('crypto'); class ShardingManager extends EventEmitter { constructor(file, totalShards) { @@ -12,11 +14,12 @@ class ShardingManager extends EventEmitter { } this.totalShards = totalShards; this.shards = new Collection(); + this.waiting = new Collection(); } createShard() { const id = this.shards.size; - const shard = childProcess.fork(path.resolve(this.file), [id, this.totalShards], { silent: true }); + const shard = new Shard(this, id); this.shards.set(id, shard); this.emit('launch', id, shard); } From b18aaa8711fa7e800a84612d058fb67814665c47 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 31 Aug 2016 13:41:07 +0100 Subject: [PATCH 267/324] Fix channel permission overwrites not being accounted for (#574) --- docs/docs.json | 2 +- src/structures/GuildChannel.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index edf3cd47a..6cc2efee6 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472565983739},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":178,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":188,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472647272899},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":178,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":188,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index d5304aa26..e39d1bb89 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -137,7 +137,7 @@ class GuildChannel extends Channel { const roleOverwrites = []; const memberOverwrites = []; - for (const overwrite of this.permissionOverwrites) { + for (const overwrite of this.permissionOverwrites.values()) { if (overwrite.id === member.id) { memberOverwrites.push(overwrite); } else if (memberRoles.indexOf(overwrite.id) > -1) { From 7f09da5d35e6ed1c6624d77c21ac921e7214f4a9 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 31 Aug 2016 14:04:20 +0100 Subject: [PATCH 268/324] more shard stuff --- src/sharding/Shard.js | 24 ++++++++++++++++++++++-- src/sharding/ShardListener.js | 28 ++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 src/sharding/ShardListener.js diff --git a/src/sharding/Shard.js b/src/sharding/Shard.js index af71d23b5..57be609e1 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -7,21 +7,41 @@ class Shard { this.manager = manager; this.id = id; this.process = childProcess.fork(path.resolve(this.manager.file), [id, this.manager.shards.size], { silent: true }); + this.waitingForResponse = new Map(); this.process.on('message', m => { if (m && m.type && m.id) { - + if (this.waitingForResponse.get(m.id)) { + const resp = this.waitingForResponse.get(m.id); + resp.resolve(m.data); + this.waitingForResponse.delete(m.id); + } else { + const reply = data => { + this.send(m.id); + } + } } }); } send(type, timeout = 60000, data = {}) { + const id = crypto.randomBytes(16).toString('hex'); + this._send(id, type, timeout, data); + } + + _send(id, type, timeout, data) { return new Promise((resolve, reject) => { - const id = crypto.randomBytes(16).toString('hex'); this.process.send({ type, id, data, }); + this.waitingForResponse.set(id, { + resolve, + }); + setTimeout(() => { + reject(new Error('did not receive response')); + this.waitingForResponse.delete(id); + }, timeout); }); } } diff --git a/src/sharding/ShardListener.js b/src/sharding/ShardListener.js new file mode 100644 index 000000000..7ee79e6c1 --- /dev/null +++ b/src/sharding/ShardListener.js @@ -0,0 +1,28 @@ +const crypto = require('crypto'); + +class ShardListener { + constructor() { + this.waitingForResponse = new Map(); + this.process = process; + } + + send(type, timeout = 60000, data = {}) { + return new Promise((resolve, reject) => { + const id = crypto.randomBytes(16).toString('hex'); + this.process.send({ + type, + id, + data, + }); + this.waitingForResponse.set(id, { + resolve, + }); + setTimeout(() => { + reject(new Error('did not receive response')); + this.waitingForResponse.delete(id); + }, timeout); + }); + } +} + +module.exports = ShardListener; From 892e162229c0a0675876aa44e7e6b4aef2a7c2fe Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 31 Aug 2016 19:27:46 +0100 Subject: [PATCH 269/324] fix setTyping and many other timeout/interval based methods --- docs/docs.json | 2 +- src/client/Client.js | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 6cc2efee6..c238e101b 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472647272899},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":178,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":188,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472668079878},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index fcc4907cb..5c42981aa 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -158,15 +158,19 @@ class Client extends EventEmitter { } setInterval(...params) { - this._intervals.push(setInterval(...params)); + const interval = setInterval(...params); + this._intervals.push(interval); + return interval; } setTimeout(...params) { const restParams = params.slice(1); - this._timeouts.push(setTimeout(() => { + const timeout = setTimeout(() => { this._timeouts.splice(this._timeouts.indexOf(params[0]), 1); params[0](); - }, ...restParams)); + }, ...restParams); + this._timeouts.push(timeout); + return timeout; } /** From 1da8ec7ddd6544ca2e437771f91289609c18f6a2 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 31 Aug 2016 20:38:56 +0100 Subject: [PATCH 270/324] Create TextBasedChannel MessageCollector --- docs/docs.json | 2 +- src/structures/DMChannel.js | 4 + src/structures/GroupDMChannel.js | 4 + src/structures/TextChannel.js | 4 + src/structures/interface/TextBasedChannel.js | 116 +++++++++++++++++++ 5 files changed, 129 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index c238e101b..c896ae169 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472668079878},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472672342320},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":159,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":173,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":159,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":173,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":227,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":271,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":120,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":159,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":173,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":227,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":271,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":120,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":159,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":173,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":95,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":58,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":97,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"A","description":"collection of messages collected during the lifetime of the Collector.\nMapped 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`.","type":{"types":[[["String",""]]]}}]}]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":159,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":173,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":227,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":271,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":120,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":159,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":173,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":159,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":173,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":227,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":271,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":120,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":138,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index eb56bd25a..8b6d1ad8f 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -70,6 +70,10 @@ class DMChannel extends Channel { fetchPinnedMessages() { return; } + + createCollector() { + return; + } } TextBasedChannel.applyToClass(DMChannel, true); diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index 4505b0fcf..5127f4334 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -147,6 +147,10 @@ class GroupDMChannel extends Channel { fetchPinnedMessages() { return; } + + createCollector() { + return; + } } TextBasedChannel.applyToClass(GroupDMChannel, true); diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 3cb0b94d2..603ae4568 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -55,6 +55,10 @@ class TextChannel extends GuildChannel { fetchPinnedMessages() { return; } + + createCollector() { + return; + } } TextBasedChannel.applyToClass(TextChannel, true); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index cd30fbfe4..c9201543c 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -1,6 +1,110 @@ const Collection = require('../../util/Collection'); const Message = require('../Message'); const path = require('path'); +const EventEmitter = require('events').EventEmitter; + +/** + * A function that takes a Message object and a MessageCollector and returns a boolean. + * ```js + * function(message, collector) { + * if (message.content.includes('discord')) { + * return true; // passed the filter test + * } + * return false; // failed the filter test + * } + * ``` + * @typedef {Function} CollectorFilterFunction + */ + +/** + * An object containing options used to configure a MessageCollector. All properties are optional. + * ```js + * { + * time: null, // time in milliseconds. If specified, the collector ends after this amount of time. + * allowSelf: false, // whether or not the filter should take messages from the logged in client. + * } + * ``` + * @typedef {Object} CollectorOptions + */ + +/** + * Collects messages based on a specified filter, then emits them. + * @extends {EventEmitter} + */ +class MessageCollector extends EventEmitter { + constructor(channel, filter, options = {}) { + super(); + /** + * The channel this collector is operating on + * @type {Channel} + */ + this.channel = channel; + /** + * A function used to filter messages that the collector collects. + * @type {CollectorFilterFunction} + */ + this.filter = filter; + /** + * Options for the collecor. + * @type {CollectorOptions} + */ + this.options = options; + this.listener = (message => this.verify(message)); + this.channel.client.on('message', this.listener); + /** + * A collection of collected messages, mapped by message ID. + * @type {Collection} + */ + this.collected = new Collection(); + if (options.time) { + this.channel.client.setTimeout(() => this.stop('time'), options.time); + } + } + + /** + * Verifies a message against the filter and options + * @private + * @param {Message} message + * @returns {Boolean} + */ + verify(message) { + if (this.channel ? this.channel.id !== message.channel.id : false) { + return false; + } + if (message.author.id === this.channel.client.user.id && !this.options.allowSelf) { + return false; + } + if (this.filter(message, this)) { + this.collected.set(message.id, message); + /** + * Emitted whenever the Collector receives a Message that passes the filter test. + * @param {Message} message the received message + * @param {MessageCollector} collector the collector the message passed through. + * @event MessageCollector#message + */ + this.emit('message', message, this); + return true; + } + return false; + } + + /** + * Stops the collector and emits `end`. + * @param {string} [reason='user'] an optional reason for stopping the collector. + */ + stop(reason = 'user') { + this.channel.client.removeListener('message', this.listener); + /** + * Emitted when the Collector stops collecting. + * @param {Collection} A collection of messages collected during the lifetime of the Collector. + * Mapped by the ID of the Messages. + * @param {String} reason The reason for the end of the collector. If it ended because it reached the specified time + * limit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. + * @event MessageCollector#end + */ + this.emit('end', this.collected, reason); + } +} /** * Interface for classes that have text-channel-like features @@ -158,6 +262,17 @@ class TextBasedChannel { } } + /** + * Creates a Message Collector + * @param {CollectorFilterFunction} filter the filter to create the collector with + * @param {CollectorOptions} [options={}] the options to pass to the collector + * @returns {MessageCollector} + */ + createCollector(filter, options = {}) { + const collector = new MessageCollector(this, filter, options); + return collector; + } + _cacheMessage(message) { const maxSize = this.client.options.max_message_cache; if (maxSize === 0) { @@ -207,6 +322,7 @@ exports.applyToClass = (structure, full = false) => { props.push('bulkDelete'); props.push('setTyping'); props.push('fetchPinnedMessages'); + props.push('createCollector'); } for (const prop of props) { applyProp(structure, prop); From e42f6b102430a67e8071321d57ec337f43b0246d Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 31 Aug 2016 20:40:08 +0100 Subject: [PATCH 271/324] Fix documentation --- docs/docs.json | 2 +- src/structures/interface/TextBasedChannel.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index c896ae169..903a68b22 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472672342320},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":159,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":173,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":159,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":173,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":227,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":271,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":120,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":159,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":173,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":227,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":271,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":120,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":159,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":173,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":95,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":58,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":97,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"A","description":"collection of messages collected during the lifetime of the Collector.\nMapped 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`.","type":{"types":[[["String",""]]]}}]}]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":159,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":173,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":227,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":271,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":120,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":159,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":173,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":113,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":159,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":173,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":227,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":271,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":120,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":138,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472672413191},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":160,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":129,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":160,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":228,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":272,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":297,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":121,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":129,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":160,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":228,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":272,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":297,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":121,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":160,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":95,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":58,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":97,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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`.","type":{"types":[[["String",""]]]}}]}]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":129,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":160,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":228,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":272,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":297,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":121,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":160,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":114,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":129,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":160,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":228,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":272,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":297,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":121,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index c9201543c..43b6726e3 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -96,7 +96,8 @@ class MessageCollector extends EventEmitter { this.channel.client.removeListener('message', this.listener); /** * Emitted when the Collector stops collecting. - * @param {Collection} A collection of messages collected during the lifetime of the Collector. + * @param {Collection} collection A collection of messages collected + * during the lifetime of the Collector. * Mapped by the ID of the Messages. * @param {String} reason The reason for the end of the collector. If it ended because it reached the specified time * limit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. From a638b6369a077d3a3efe4dbeecf329122ccc311e Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 31 Aug 2016 20:44:30 +0100 Subject: [PATCH 272/324] Stop multiple end events --- docs/docs.json | 2 +- src/structures/interface/TextBasedChannel.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 903a68b22..b80bc623a 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472672413191},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":160,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":129,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":160,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":228,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":272,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":297,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":121,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":129,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":160,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":228,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":272,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":297,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":121,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":160,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":95,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":58,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":97,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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`.","type":{"types":[[["String",""]]]}}]}]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":129,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":160,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":228,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":272,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":297,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":121,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":160,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":114,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":129,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":160,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":228,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":272,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":297,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":121,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":204,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472672675565},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":169,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":192,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":138,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":169,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":192,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":237,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":265,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":281,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":306,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":130,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":138,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":169,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":192,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":237,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":265,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":281,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":306,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":130,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":169,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":192,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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`.","type":{"types":[[["String",""]]]}}]}]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":138,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":169,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":192,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":237,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":265,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":281,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":306,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":130,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":169,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":192,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":138,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":169,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":192,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":237,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":265,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":281,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":306,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":130,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":148,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":213,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 43b6726e3..9f533e0f3 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -49,6 +49,11 @@ class MessageCollector extends EventEmitter { * @type {CollectorOptions} */ this.options = options; + /** + * Whether this collector has stopped collecting Messages. + * @type {Boolean} + */ + this.ended = false; this.listener = (message => this.verify(message)); this.channel.client.on('message', this.listener); /** @@ -93,6 +98,10 @@ class MessageCollector extends EventEmitter { * @param {string} [reason='user'] an optional reason for stopping the collector. */ stop(reason = 'user') { + if (this.ended) { + return; + } + this.ended = true; this.channel.client.removeListener('message', this.listener); /** * Emitted when the Collector stops collecting. From 91b1fa83596fd61798e3930e6125e3a7ddff4bbe Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 31 Aug 2016 20:48:45 +0100 Subject: [PATCH 273/324] Add CollectorOptions.max --- docs/docs.json | 2 +- src/structures/interface/TextBasedChannel.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index b80bc623a..ffb4ef3f0 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472672675565},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":169,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":192,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":138,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":169,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":192,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":237,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":265,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":281,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":306,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":130,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":138,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":169,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":192,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":237,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":265,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":281,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":306,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":130,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":169,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":192,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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`.","type":{"types":[[["String",""]]]}}]}]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":138,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":169,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":192,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":237,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":265,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":281,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":306,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":130,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":169,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":192,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":138,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":169,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":183,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":192,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":237,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":265,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":281,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":306,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":130,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":148,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":213,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472672930765},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":311,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":311,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":311,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":311,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 9f533e0f3..724a8b435 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -22,6 +22,7 @@ const EventEmitter = require('events').EventEmitter; * { * time: null, // time in milliseconds. If specified, the collector ends after this amount of time. * allowSelf: false, // whether or not the filter should take messages from the logged in client. + * max: null, // the maximum amount of messages to handle before ending. * } * ``` * @typedef {Object} CollectorOptions @@ -88,6 +89,9 @@ 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'); + } return true; } return false; @@ -109,7 +113,8 @@ class MessageCollector extends EventEmitter { * during the lifetime of the Collector. * Mapped by the ID of the Messages. * @param {String} reason The reason for the end of the collector. If it ended because it reached the specified time - * limit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. + * limit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it + * ended because it reached its message limit, it will be `limit`. * @event MessageCollector#end */ this.emit('end', this.collected, reason); From ff3148ddd4ef9cc13c861846561e1a95c2e41db0 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 31 Aug 2016 21:13:33 +0100 Subject: [PATCH 274/324] Add awaitMessages --- docs/docs.json | 2 +- src/structures/DMChannel.js | 4 +++ src/structures/GroupDMChannel.js | 4 +++ src/structures/TextChannel.js | 4 +++ src/structures/interface/TextBasedChannel.js | 31 ++++++++++++++++++++ 5 files changed, 44 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index ffb4ef3f0..f211582ec 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472672930765},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":311,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":311,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":311,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":311,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472674418673},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 8b6d1ad8f..0c882293a 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -74,6 +74,10 @@ class DMChannel extends Channel { createCollector() { return; } + + awaitMessages() { + return; + } } TextBasedChannel.applyToClass(DMChannel, true); diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index 5127f4334..df1645250 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -151,6 +151,10 @@ class GroupDMChannel extends Channel { createCollector() { return; } + + awaitMessages() { + return; + } } TextBasedChannel.applyToClass(GroupDMChannel, true); diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 603ae4568..17a7325c9 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -59,6 +59,10 @@ class TextChannel extends GuildChannel { createCollector() { return; } + + awaitMessages() { + return; + } } TextBasedChannel.applyToClass(TextChannel, true); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 724a8b435..64a567175 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -288,6 +288,36 @@ class TextBasedChannel { return collector; } + /** + * An object containing the same properties as CollectorOptions, but a few more: + * ```js + * { + * errors: [], // an array of stop/end reasons that cause the promise to reject. + * } + * ``` + * @typedef {Object} AwaitMessagesOptions + */ + + /** + * Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified + * filter. + * @param {CollectorFilterFunction} filter the filter function to use + * @param {AwaitMessagesOptions} [options={}] optional options to pass to the internal collector + * @returns {Promise>} + */ + awaitMessages(filter, options = {}) { + return new Promise((resolve, reject) => { + const collector = this.createCollector(filter, options); + collector.on('end', (collection, reason) => { + if (options.errors && options.errors.includes(reason)) { + reject(collection); + } else { + resolve(collection); + } + }); + }); + } + _cacheMessage(message) { const maxSize = this.client.options.max_message_cache; if (maxSize === 0) { @@ -338,6 +368,7 @@ exports.applyToClass = (structure, full = false) => { props.push('setTyping'); props.push('fetchPinnedMessages'); props.push('createCollector'); + props.push('awaitMessages'); } for (const prop of props) { applyProp(structure, prop); From e8c1c228d06919f696a0f851b8facbee8972f053 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 31 Aug 2016 21:34:43 +0100 Subject: [PATCH 275/324] Refactor getMessages to fetchMessages --- docs/docs.json | 2 +- src/structures/DMChannel.js | 2 +- src/structures/GroupDMChannel.js | 2 +- src/structures/TextChannel.js | 2 +- src/structures/interface/TextBasedChannel.js | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index f211582ec..deb014f04 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472674418673},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472675689046},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 0c882293a..4ac0ac500 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -55,7 +55,7 @@ class DMChannel extends Channel { return; } - getMessages() { + fetchMessages() { return; } diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index df1645250..a964120a8 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -132,7 +132,7 @@ class GroupDMChannel extends Channel { return; } - getMessages() { + fetchMessages() { return; } diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 17a7325c9..da6218abd 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -40,7 +40,7 @@ class TextChannel extends GuildChannel { return; } - getMessages() { + fetchMessages() { return; } diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 64a567175..2102b616e 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -235,11 +235,11 @@ class TextBasedChannel { * @returns {Promise, Error>} * @example * // get messages - * channel.getMessages({limit: 10}) + * channel.fetchMessages({limit: 10}) * .then(messages => console.log(`Received ${messages.size} messages`)) * .catch(console.log); */ - getMessages(options = {}) { + fetchMessages(options = {}) { return new Promise((resolve, reject) => { this.client.rest.methods.getChannelMessages(this, options) .then(data => { @@ -363,7 +363,7 @@ exports.applyToClass = (structure, full = false) => { const props = ['sendMessage', 'sendTTSMessage', 'sendFile']; if (full) { props.push('_cacheMessage'); - props.push('getMessages'); + props.push('fetchMessages'); props.push('bulkDelete'); props.push('setTyping'); props.push('fetchPinnedMessages'); From 5f5ee1854398e3f7c769744aecebbf0b73bf455a Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 31 Aug 2016 21:42:08 +0100 Subject: [PATCH 276/324] Move message.mentionEveryone to message.mentions.everyone --- docs/docs.json | 2 +- src/structures/Message.js | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index deb014f04..069d7630e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472675689046},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472676133717},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/Message.js b/src/structures/Message.js index 74fd5f074..000b6071e 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -70,11 +70,6 @@ class Message { * @type {Boolean} */ this.tts = data.tts; - /** - * Whether the message mentioned @everyone or not - * @type {Boolean} - */ - this.mentionEveryone = data.mention_everyone; /** * A random number used for checking message delivery * @type {String} @@ -100,11 +95,13 @@ class Message { * @property {Collection} mentions.roles Mentioned roles, maps their ID to the role object. * @property {Collection} * mentions.channels Mentioned channels, maps their ID to the channel object. + * @property {Boolean} mentions.everyone whether or not @everyone was mentioned. */ this.mentions = { users: new Collection(), roles: new Collection(), channels: new Collection(), + everyone: data.mention_everyone, }; /** * The ID of the message (unique in the channel it was sent) @@ -167,11 +164,11 @@ class Message { if (data.edited_timestamp) { this.editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp) : null; } - if (data.tts) { + if ('tts' in data) { this.tts = data.tts; } - if (data.mention_everyone) { - this.mentionEveryone = data.mention_everyone; + if ('mention_everyone' in data) { + this.mentions.everyone = data.mention_everyone; } if (data.nonce) { this.nonce = data.nonce; @@ -249,7 +246,7 @@ class Message { this.attachments.length === message.attachments.length; if (base && rawData) { - base = this.mentionEveryone === message.mentionEveryone && + base = this.mentions.everyone === message.mentions.everyone && this.timestamp.getTime() === new Date(rawData.timestamp).getTime() && this.editedTimestamp === new Date(rawData.edited_timestamp).getTime(); } From 1298fefa2f02648eaf369d6c0d561e04620cf978 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 1 Sep 2016 10:08:28 +0100 Subject: [PATCH 277/324] Fix message docs --- docs/docs.json | 2 +- src/structures/Message.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 069d7630e..8350703aa 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472676133717},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472720925907},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/Message.js b/src/structures/Message.js index 000b6071e..4279fcb4b 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -9,7 +9,7 @@ class Message { this._type = 'message'; /** * The channel that the message was sent in - * @type {Channel} + * @type {TextChannel|DMChannel|GroupDMChannel} */ this.channel = channel; @@ -42,10 +42,6 @@ class Message { * @type {User} */ this.author = this.client.dataManager.newUser(data.author); - /** - * The content of the message - * @type {String} - */ if (this.guild) { /** * Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild @@ -54,6 +50,10 @@ class Message { */ this.member = this.guild.member(this.author); } + /** + * The content of the message + * @type {String} + */ this.content = data.content; /** * When the message was sent From 28ad224207c11cf4795852b6fffb39d20fafa105 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 1 Sep 2016 12:05:24 +0100 Subject: [PATCH 278/324] Add GuildMember as user resolvable --- docs/docs.json | 2 +- src/client/ClientDataResolver.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 8350703aa..9518d87b0 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472720925907},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472727929353},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index 900784666..890d8afa4 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -30,7 +30,8 @@ class ClientDataResolver { * * A User ID * * A Message (resolves to the message author) * * A Guild (owner of the guild) - * @typedef {User|String|Message|Guild} UserResolvable + * * A Guild Member + * @typedef {User|String|Message|Guild|GuildMember} UserResolvable */ /** @@ -47,6 +48,8 @@ class ClientDataResolver { return user.author; } else if (user instanceof Guild) { return user.owner; + } else if (user instanceof GuildMember) { + return user.user; } return null; From a725147f17f7e094a7e1eb8e60ded4d0fa8a886e Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 1 Sep 2016 13:08:49 +0100 Subject: [PATCH 279/324] Document EvaluatedPermissions --- docs/docs.json | 2 +- src/structures/EvaluatedPermissions.js | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 9518d87b0..8ef036523 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472727929353},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472731734875},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["any",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","optional":true,"type":{"types":[[["any",""]]]}}]}],"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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/EvaluatedPermissions.js b/src/structures/EvaluatedPermissions.js index 32ac3557d..cbf565306 100644 --- a/src/structures/EvaluatedPermissions.js +++ b/src/structures/EvaluatedPermissions.js @@ -1,11 +1,28 @@ const Constants = require('../util/Constants'); +/** + * The final evaluated permissions for a member in a channel + */ class EvaluatedPermissions { constructor(member, permissions) { + /** + * The member this permissions refer to + * @type {GuildMember} + */ this.member = member; + /** + * A number representing the packed permissions. + * @private + * @type {Number} + */ this.permissions = permissions; } + /** + * Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user + * can perform this or not. + * @returns {Object} + */ serialize() { const serializedPermissions = {}; for (const permissionName in Constants.PermissionFlags) { @@ -15,7 +32,13 @@ class EvaluatedPermissions { return serializedPermissions; } - hasPermission(permission, explicit) { + /** + * Checks whether a user has a certain permission, e.g. `READ_MESSAGES`. + * @param {any} permission the permission to check for + * @param {any} [explicit=false] whether the user should explicitly have the permission. + * @returns {Boolean} + */ + hasPermission(permission, explicit = false) { if (permission instanceof String || typeof permission === 'string') { permission = Constants.PermissionFlags[permission]; } From aee547d28e2869d1d7993523b2c35ec5bd2df338 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 1 Sep 2016 13:10:46 +0100 Subject: [PATCH 280/324] fix docs --- docs/docs.json | 2 +- src/structures/EvaluatedPermissions.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 8ef036523..d5a641d30 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472731734875},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["any",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","optional":true,"type":{"types":[[["any",""]]]}}]}],"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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472731851600},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/EvaluatedPermissions.js b/src/structures/EvaluatedPermissions.js index cbf565306..842e61da8 100644 --- a/src/structures/EvaluatedPermissions.js +++ b/src/structures/EvaluatedPermissions.js @@ -34,8 +34,8 @@ class EvaluatedPermissions { /** * Checks whether a user has a certain permission, e.g. `READ_MESSAGES`. - * @param {any} permission the permission to check for - * @param {any} [explicit=false] whether the user should explicitly have the permission. + * @param {String} permission the permission to check for + * @param {Boolean} [explicit=false] whether the user should explicitly have the permission. * @returns {Boolean} */ hasPermission(permission, explicit = false) { From 552d603782dee1866b4dd85ea65aeed65da62a45 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 1 Sep 2016 14:50:40 +0100 Subject: [PATCH 281/324] Try and fix author bug? --- docs/docs.json | 2 +- src/structures/Guild.js | 12 +++++++----- test/random.js | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index d5a641d30..8e321a652 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472731851600},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472737845127},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":378,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":391,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":404,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":434,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":448,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":462,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":476,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":490,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":504,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":518,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":532,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":546,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":560,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":568,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":576,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":320,"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":613,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 76b33270e..218886bdc 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -312,11 +312,13 @@ class Guild { } } - /** - * The owner of the guild - * @type {GuildMember} - */ - this.owner = this.members.get(data.owner_id); + if (data.owner_id) { + /** + * The owner of the guild + * @type {GuildMember} + */ + this.owner = this.members.get(data.owner_id); + } if (data.channels) { this.channels.clear(); diff --git a/test/random.js b/test/random.js index 3ec5fc956..8d58d3086 100644 --- a/test/random.js +++ b/test/random.js @@ -112,7 +112,7 @@ client.on('message', msg => { msg.channel.sendMessage('```' + msg.content + '```'); } - if (msg.content.startsWith('?eval') && msg.author.id === '66564597481480192') { + if (msg.content.startsWith('#eval') && msg.author.id === '66564597481480192') { try { const com = eval(msg.content.split(" ").slice(1).join(" ")); msg.channel.sendMessage('```\n' + com + '```'); From 8d9a778320d3728b0bf2e93690ee61e3e701112c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 1 Sep 2016 15:54:52 +0100 Subject: [PATCH 282/324] fix guild owner --- docs/docs.json | 2 +- src/structures/Guild.js | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 8e321a652..dc7fe498a 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472737845127},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":378,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":391,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":404,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":417,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":434,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":448,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":462,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":476,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":490,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":504,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":518,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":532,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":546,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":560,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":568,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":576,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":320,"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":613,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472741698401},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":486,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":500,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":528,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":542,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":572,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":582,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":609,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["Member",""]]]},"meta":{"line":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 218886bdc..c59e2ce46 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -195,7 +195,7 @@ class Guild { this.large === data.large && this.icon === data.icon && arraysEqual(this.features, data.features) && - this.owner.id === data.owner_id && + this.ownerID === data.owner_id && this.verificationLevel === data.verification_level && this.embedEnabled === data.embed_enabled; @@ -313,11 +313,7 @@ class Guild { } if (data.owner_id) { - /** - * The owner of the guild - * @type {GuildMember} - */ - this.owner = this.members.get(data.owner_id); + this.ownerID = data.owner_id; } if (data.channels) { @@ -616,6 +612,15 @@ class Guild { } return Constants.Endpoints.guildIcon(this.id, this.icon); } + + /** + * The owner of the Guild + * @type {Member} + * @readonly + */ + get owner() { + return this.members.get(this.ownerID); + } } module.exports = Guild; From df9cab3864dc4b6f37504e1766a04c632afa42df Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 1 Sep 2016 15:55:09 +0100 Subject: [PATCH 283/324] whoops fix docs --- docs/docs.json | 2 +- src/structures/Guild.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index dc7fe498a..acaf20c75 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472741698401},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":486,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":500,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":528,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":542,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":572,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":582,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":609,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["Member",""]]]},"meta":{"line":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472741714050},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":486,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":500,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":528,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":542,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":572,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":582,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index c59e2ce46..a34e7ab5c 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -615,7 +615,7 @@ class Guild { /** * The owner of the Guild - * @type {Member} + * @type {GuildMember} * @readonly */ get owner() { From 43f1c952c34eb903ccf9f94e48c46314eece5e72 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 1 Sep 2016 17:17:59 +0100 Subject: [PATCH 284/324] do more docs --- docs/docs.json | 2 +- src/structures/interface/TextBasedChannel.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index acaf20c75..bda825474 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472741714050},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":486,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":500,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":528,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":542,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":572,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":582,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","meta":{"line":286,"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","meta":{"line":308,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":341,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":291,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472746685178},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":294,"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":323,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":356,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":294,"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":323,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":356,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":486,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":500,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":528,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":542,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":572,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":582,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":294,"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":323,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":356,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","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":294,"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":323,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":356,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 2102b616e..2adb5b72b 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -282,6 +282,14 @@ class TextBasedChannel { * @param {CollectorFilterFunction} filter the filter to create the collector with * @param {CollectorOptions} [options={}] the options to pass to the collector * @returns {MessageCollector} + * @example + * // create a message collector + * const collector = channel.createCollector( + * m => m.content.includes('discord'), + * { time: 15000 } + * ); + * collector.on('message', m => console.log(`Collected ${m.content}`)); + * collector.on('end', collected => console.log(`Collected ${collected.size} items`)); */ createCollector(filter, options = {}) { const collector = new MessageCollector(this, filter, options); @@ -304,6 +312,13 @@ class TextBasedChannel { * @param {CollectorFilterFunction} filter the filter function to use * @param {AwaitMessagesOptions} [options={}] optional options to pass to the internal collector * @returns {Promise>} + * @example + * // await !vote messages + * const filter = m => m.content.startsWith('!vote'); + * // errors: ['time'] treats ending because of the time limit as an error + * channel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] }) + * .then(collected => console.log(collected.size)) + * .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`)); */ awaitMessages(filter, options = {}) { return new Promise((resolve, reject) => { From 168256469e412859f1b12ab7ce563b275807ceeb Mon Sep 17 00:00:00 2001 From: Hyper-Coder Date: Thu, 1 Sep 2016 19:03:33 -0400 Subject: [PATCH 285/324] Re add .uptime (#579) --- src/client/Client.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/client/Client.js b/src/client/Client.js index 5c42981aa..e4148fa7d 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -193,6 +193,15 @@ class Client extends EventEmitter { return this.voice.connections; } + /** + * The uptime for the logged in Client. + * @readonly + * @type {?Number} + */ + get uptime() { + return this.readyTime ? Date.now() - this.readyTime : null; + } + } module.exports = Client; From b8a5669fda57542292b23167408670c7811c8d89 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 2 Sep 2016 08:00:33 -0400 Subject: [PATCH 286/324] Overhaul channel typing system (#576) * Overhaul channel typing system * Fix ESLint error * Add channel.isTyping() * Add count argument to startTyping * Add range checking to startTyping count * Better range checking for count * Add channel.getTypingCount() * Change getTypingCount() to typingCount getter * Switch isTyping() to typing getter * Fix new methods and switch to Map * Fix applyProp so getters/setters will work * Add default value to force --- src/structures/DMChannel.js | 14 +++- src/structures/GroupDMChannel.js | 14 +++- src/structures/TextChannel.js | 14 +++- src/structures/interface/TextBasedChannel.js | 74 ++++++++++++++++---- 4 files changed, 99 insertions(+), 17 deletions(-) diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 4ac0ac500..2638f3753 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -63,7 +63,19 @@ class DMChannel extends Channel { return; } - setTyping() { + startTyping() { + return; + } + + stopTyping() { + return; + } + + get typing() { + return; + } + + get typingCount() { return; } diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index a964120a8..6291e6545 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -140,7 +140,19 @@ class GroupDMChannel extends Channel { return; } - setTyping() { + startTyping() { + return; + } + + stopTyping() { + return; + } + + get typing() { + return; + } + + get typingCount() { return; } diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index da6218abd..f8057bc08 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -48,7 +48,19 @@ class TextChannel extends GuildChannel { return; } - setTyping() { + startTyping() { + return; + } + + stopTyping() { + return; + } + + get typing() { + return; + } + + get typingCount() { return; } diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 2adb5b72b..2f70ffdcd 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -256,27 +256,70 @@ class TextBasedChannel { } /** - * Starts or stops a typing indicator in the channel. - * It can take a few seconds for the Client User to stop typing. - * @param {Boolean} typing whether or not the client user should be typing + * Starts a typing indicator in the channel. + * @param {Number} [count] The number of times startTyping should be considered to have been called * @returns {null} * @example * // start typing in a channel - * channel.setTyping(true); + * channel.startTyping(); + */ + startTyping(count) { + if (typeof count !== 'undefined' && count < 1) throw new RangeError('count must be at least 1'); + if (!this.client.user._typing.has(this.id)) { + this.client.user._typing.set(this.id, { + count: count || 1, + interval: this.client.setInterval(() => { + this.client.rest.methods.sendTyping(this.id); + }, 4000), + }); + this.client.rest.methods.sendTyping(this.id); + } else { + const entry = this.client.user._typing.get(this.id); + entry.count = count || entry.count + 1; + } + } + + /** + * Stops the typing indicator in the channel. + * The indicator will only stop if this is called as many times as startTyping(). + * It can take a few seconds for the Client User to stop typing. + * @param {Boolean} [force=false] whether or not to force the indicator to stop regardless of call count + * @returns {null} * @example * // stop typing in a channel - * channel.setTyping(false); + * channel.stopTyping(); + * @example + * // force typing to fully stop in a channel + * channel.stopTyping(true); */ - setTyping(typing) { - clearInterval(this.client.user._typing.get(this.id)); - if (typing) { - this.client.user._typing.set(this.id, this.client.setInterval(() => { - this.client.rest.methods.sendTyping(this.id); - }, 4000)); - this.client.rest.methods.sendTyping(this.id); + stopTyping(force = false) { + if (this.client.user._typing.has(this.id)) { + const entry = this.client.user._typing.get(this.id); + entry.count--; + if (entry.count <= 0 || force) { + clearInterval(entry.interval); + this.client.user._typing.delete(this.id); + } } } + /** + * Whether or not the typing indicator is being shown in the channel. + * @type {Boolean} + */ + get typing() { + return this.client.user._typing.has(this.id); + } + + /** + * Number of times `startTyping` has been called. + * @type {Number} + */ + get typingCount() { + if (this.client.user._typing.has(this.id)) return this.client.user._typing.get(this.id).count; + return 0; + } + /** * Creates a Message Collector * @param {CollectorFilterFunction} filter the filter to create the collector with @@ -371,7 +414,7 @@ class TextBasedChannel { } function applyProp(structure, prop) { - structure.prototype[prop] = TextBasedChannel.prototype[prop]; + Object.defineProperty(structure.prototype, prop, Object.getOwnPropertyDescriptor(TextBasedChannel.prototype, prop)); } exports.applyToClass = (structure, full = false) => { @@ -380,7 +423,10 @@ exports.applyToClass = (structure, full = false) => { props.push('_cacheMessage'); props.push('fetchMessages'); props.push('bulkDelete'); - props.push('setTyping'); + props.push('startTyping'); + props.push('stopTyping'); + props.push('typing'); + props.push('typingCount'); props.push('fetchPinnedMessages'); props.push('createCollector'); props.push('awaitMessages'); From ae17a891912afc7c0afe01f6b050d3f92047215e Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 2 Sep 2016 13:18:15 +0100 Subject: [PATCH 287/324] Reduce memory usage by dynamically creating Dates --- docs/docs.json | 2 +- src/structures/Guild.js | 13 ++++++++----- src/structures/GuildMember.js | 14 +++++++++----- src/structures/Invite.js | 15 +++++++++------ src/structures/Message.js | 35 +++++++++++++++++++++-------------- test/random.js | 2 +- 6 files changed, 49 insertions(+), 32 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index bda825474..1f79dd5f9 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472746685178},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":294,"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":323,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":356,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":294,"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":323,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":356,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":387,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":400,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":413,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":486,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":500,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":528,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":542,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":572,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":582,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":232,"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#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.log);"],"meta":{"line":267,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":287,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":302,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":311,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":319,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"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":77,"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":87,"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":100,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":110,"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":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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":294,"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":323,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":356,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":270,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","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":294,"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":323,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":356,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472818707509},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":201,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":310,"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":318,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":310,"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":318,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":377,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":390,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":433,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":447,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":461,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":475,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":489,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":503,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":517,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":531,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":567,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":575,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":585,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":286,"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":291,"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":296,"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":301,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":362,"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":612,"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":624,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"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":310,"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":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":310,"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":318,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":342,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index a34e7ab5c..b918e403e 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -260,11 +260,7 @@ class Guild { * @type {Boolean} */ this.large = data.large; - /** - * The date at which the logged-in client joined the guild. - * @type {Date} - */ - this.joinDate = new Date(data.joined_at); + this._joinDate = new Date(data.joined_at).getTime(); /** * The hash of the guild icon, or null if there is no icon. * @type {?String} @@ -359,6 +355,13 @@ class Guild { } } } + /** + * The date at which the logged-in client joined the guild. + * @type {Date} + */ + get joinDate() { + return new Date(this._joinDate); + } /** * Creates a new Channel in the Guild. diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 640f9b3d1..e4aed5399 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -59,11 +59,7 @@ class GuildMember { * @type {?String} */ this.voiceChannelID = data.channel_id; - /** - * The date this member joined the guild - * @type {Date} - */ - this.joinDate = new Date(data.joined_at); + this._joinDate = new Date(data.joined_at).getTime(); /** * Whether this meember is speaking * @type {?Boolean} @@ -77,6 +73,14 @@ class GuildMember { this._roles = data.roles; } + /** + * The date this member joined the guild + * @type {Date} + */ + get joinDate() { + return new Date(this._joinDate); + } + /** * A list of roles that are applied to this GuildMember * @type {Array} diff --git a/src/structures/Invite.js b/src/structures/Invite.js index 433fd99ef..df6ba861e 100644 --- a/src/structures/Invite.js +++ b/src/structures/Invite.js @@ -47,12 +47,7 @@ class Invite { * @type {String} */ this.code = data.code; - - /** - * The creation date of the invite - * @type {Date} - */ - this.creationDate = new Date(data.created_at); + this._creationDate = new Date(data.created_at).getTime(); /** * Whether or not this invite is temporary @@ -93,6 +88,14 @@ class Invite { this.channels = this.client.channels.get(data.channel.id) || new PartialGuildChannel(this.client, data.channel); } + /** + * The creation date of the invite + * @type {Date} + */ + get creationDate() { + return new Date(this._creationDate); + } + /** * Deletes this invite * @returns {Promise} diff --git a/src/structures/Message.js b/src/structures/Message.js index 4279fcb4b..1c80e2089 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -55,16 +55,8 @@ class Message { * @type {String} */ this.content = data.content; - /** - * When the message was sent - * @type {Date} - */ - this.timestamp = new Date(data.timestamp); - /** - * If the message was edited, the timestamp at which it was last edited - * @type {?Date} - */ - this.editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp) : null; + this._timestamp = new Date(data.timestamp).getTime(); + this._editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp).getTime() : null; /** * Whether or not the message was Text-To-Speech * @type {Boolean} @@ -147,6 +139,21 @@ class Message { this.system = true; } } + /** + * When the message was sent + * @type {Date} + */ + get timestamp() { + return new Date(this._timestamp); + } + + /** + * If the message was edited, the timestamp at which it was last edited + * @type {?Date} + */ + get editedTimestamp() { + return new Date(this._editedTimestamp); + } patch(data) { if (data.author) { @@ -159,10 +166,10 @@ class Message { this.content = data.content; } if (data.timestamp) { - this.timestamp = new Date(data.timestamp); + this._timestamp = new Date(data.timestamp).getTime(); } if (data.edited_timestamp) { - this.editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp) : null; + this._editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp).getTime() : null; } if ('tts' in data) { this.tts = data.tts; @@ -247,8 +254,8 @@ class Message { if (base && rawData) { base = this.mentions.everyone === message.mentions.everyone && - this.timestamp.getTime() === new Date(rawData.timestamp).getTime() && - this.editedTimestamp === new Date(rawData.edited_timestamp).getTime(); + this._timestamp === new Date(rawData.timestamp).getTime() && + this._editedTimestamp === new Date(rawData.edited_timestamp).getTime(); } return base; diff --git a/test/random.js b/test/random.js index 8d58d3086..9364431db 100644 --- a/test/random.js +++ b/test/random.js @@ -4,7 +4,7 @@ const Discord = require('../'); const request = require('superagent'); const fs = require('fs'); -const client = new Discord.Client({ fetch_all_members: false }); +const client = new Discord.Client({ fetch_all_members: true }); const { email, password, token } = require('./auth.json'); From 7d27667afc217d5a38c06e71139590e2f4d2da9a Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 2 Sep 2016 16:56:06 +0100 Subject: [PATCH 288/324] Fix weird guild ug --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 1f79dd5f9..b72cd99a7 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472818707509},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":201,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":310,"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":318,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":310,"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":318,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":377,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":390,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":433,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":447,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":461,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":475,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":489,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":503,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":517,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":531,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":567,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":575,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":585,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":286,"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":291,"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":296,"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":301,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":362,"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":612,"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":624,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"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":310,"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":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":310,"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":318,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":342,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472831773092},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":201,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":310,"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":318,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":310,"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":318,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":377,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":390,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":433,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":447,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":461,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":475,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":489,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":503,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":517,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":531,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":567,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":575,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":585,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":286,"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":291,"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":296,"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":301,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":362,"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":612,"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":624,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"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":310,"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":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":310,"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":318,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":342,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 517b69e86..aa6e1642d 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -180,7 +180,7 @@ class RESTMethods { } leaveGuild(guild) { - if (guild.owner.id === this.rest.client.user.id) { + if (guild.owner && guild.owner.id === this.rest.client.user.id) { return this.deleteGuild(guild); } return new Promise((resolve, reject) => { From 1cbd1bda46a66c7b173923ba685b6ba502e8f845 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 2 Sep 2016 16:57:07 +0100 Subject: [PATCH 289/324] fix the bug in a better way --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index b72cd99a7..a95d39479 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472831773092},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":201,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":310,"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":318,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":310,"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":318,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":377,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":390,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":433,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":447,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":461,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":475,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":489,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":503,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":517,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":531,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":567,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":575,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":585,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":286,"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":291,"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":296,"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":301,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":362,"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":612,"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":624,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"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":310,"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":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":310,"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":318,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":342,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472831833736},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":201,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":310,"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":318,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":310,"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":318,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":377,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":390,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":433,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":447,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":461,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":475,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":489,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":503,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":517,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":531,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":567,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":575,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":585,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":286,"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":291,"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":296,"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":301,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":362,"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":612,"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":624,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"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":310,"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":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":310,"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":318,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":342,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index aa6e1642d..cf0cb32a2 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -180,7 +180,7 @@ class RESTMethods { } leaveGuild(guild) { - if (guild.owner && guild.owner.id === this.rest.client.user.id) { + if (guild.ownerID === this.rest.client.user.id) { return this.deleteGuild(guild); } return new Promise((resolve, reject) => { From 44efcf3f523be39f55b0abaf37f3ba51a54055e9 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 3 Sep 2016 04:56:33 -0400 Subject: [PATCH 290/324] Lower Node version requirement to 6.0.0 (#583) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a9de93b2c..f974f5b2a 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "node-opus": "^0.1.13" }, "engines": { - "node": ">=6.4.0" + "node": ">=6.0.0" }, "browser": { "./src/Util/TokenCacher.js": "./src/Util/TokenCacher-shim.js", From 27652b94af4ccd0223072293292b66b389a71ac7 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 3 Sep 2016 04:57:25 -0400 Subject: [PATCH 291/324] Make JSDocs follow general conventions (#582) * Make JSDocs follow usual conventions * Fix StringResolvable name * Make function lowercase --- src/client/Client.js | 26 ++++----- src/client/ClientDataResolver.js | 16 +++--- src/client/ClientManager.js | 14 ++--- .../rest/RequestHandlers/RequestHandler.js | 2 +- src/client/rest/RequestHandlers/Sequential.js | 6 +- src/client/voice/ClientVoiceManager.js | 18 +++--- src/client/voice/VoiceConnection.js | 18 +++--- .../voice/dispatcher/StreamDispatcher.js | 10 ++-- src/client/voice/receiver/VoiceReceiver.js | 2 +- src/client/websocket/WebSocketManager.js | 30 +++++----- .../packets/handlers/MessageDeleteBulk.js | 2 +- src/structures/Channel.js | 4 +- src/structures/ClientUser.js | 14 ++--- src/structures/DMChannel.js | 4 +- src/structures/Emoji.js | 14 ++--- src/structures/EvaluatedPermissions.js | 10 ++-- src/structures/GroupDMChannel.js | 10 ++-- src/structures/Guild.js | 56 +++++++++---------- src/structures/GuildChannel.js | 18 +++--- src/structures/GuildMember.js | 30 +++++----- src/structures/Invite.js | 10 ++-- src/structures/Message.js | 30 +++++----- src/structures/MessageAttachment.js | 14 ++--- src/structures/MessageEmbed.js | 20 +++---- src/structures/PartialGuild.js | 8 +-- src/structures/PartialGuildChannel.js | 6 +- src/structures/PermissionOverwrites.js | 4 +- src/structures/Role.js | 36 ++++++------ src/structures/TextChannel.js | 2 +- src/structures/User.js | 20 +++---- src/structures/VoiceChannel.js | 10 ++-- src/structures/interface/TextBasedChannel.js | 42 +++++++------- src/util/Collection.js | 18 +++--- 33 files changed, 262 insertions(+), 262 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index e4148fa7d..579642d58 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -67,22 +67,22 @@ class Client extends EventEmitter { this.voice = new ClientVoiceManager(this); /** * A Collection of the Client's stored users - * @type {Collection} + * @type {Collection} */ this.users = new Collection(); /** * A Collection of the Client's stored guilds - * @type {Collection} + * @type {Collection} */ this.guilds = new Collection(); /** * A Collection of the Client's stored channels - * @type {Collection} + * @type {Collection} */ this.channels = new Collection(); /** * The authorization token for the logged in user/bot. - * @type {?String} + * @type {?string} */ this.token = null; /** @@ -92,17 +92,17 @@ class Client extends EventEmitter { this.user = null; /** * The email, if there is one, for the logged in Client - * @type {?String} + * @type {?string} */ this.email = null; /** * The password, if there is one, for the logged in Client - * @type {?String} + * @type {?string} */ this.password = null; /** * The time in milliseconds the Client connected - * @type {?Number} + * @type {?number} */ this.readyTime = null; this._intervals = []; @@ -114,10 +114,10 @@ class Client extends EventEmitter { * much better to use a bot account rather than a user account. * Bot accounts have higher rate limits and have access to some features user accounts don't have. User bots * that are making a lot of API requests can even be banned. - * @param {String} emailOrToken The email or token used for the account. If it is an email, a password _must_ be + * @param {string} emailOrToken The email or token used for the account. If it is an email, a password _must_ be * provided. - * @param {String} [password] The password for the account, only needed if an email was provided. - * @return {Promise} + * @param {string} [password] The password for the account, only needed if an email was provided. + * @return {Promise} * @example * // log the client in using a token * const token = 'my token'; @@ -176,7 +176,7 @@ class Client extends EventEmitter { /** * Caches a user, or obtains it from the cache if it's already cached. * If the user isn't already cached, it will only be obtainable by OAuth bot accounts. - * @param {String} id The ID of the user to obtain + * @param {string} id The ID of the user to obtain * @return {Promise} */ fetchUser(id) { @@ -187,7 +187,7 @@ class Client extends EventEmitter { /** * Returns a Collection, mapping Guild ID to Voice Connections. * @readonly - * @type {Collection} + * @type {Collection} */ get voiceConnections() { return this.voice.connections; @@ -196,7 +196,7 @@ class Client extends EventEmitter { /** * The uptime for the logged in Client. * @readonly - * @type {?Number} + * @type {?number} */ get uptime() { return this.readyTime ? Date.now() - this.readyTime : null; diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index 890d8afa4..bac611258 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -106,13 +106,13 @@ class ClientDataResolver { * Data that resolves to give a Base64 string, typically for image uploading. This can be: * * A Buffer * * A Base64 String - * @typedef {Buffer|String} Base64Resolvable + * @typedef {Buffer|string} Base64Resolvable */ /** * Resolves a Base64Resolvable to a Base 64 image * @param {Base64Resolvable} dataResolvable the base 64 resolvable you want to resolve - * @returns {?String} + * @returns {?string} */ resolveBase64(data) { if (data instanceof Buffer) { @@ -126,7 +126,7 @@ class ClientDataResolver { * Data that can be resolved to give a Channel. This can be: * * An instance of a Channel * * An ID of a Channel - * @typedef {Channel|String} ChannelResolvable + * @typedef {Channel|string} ChannelResolvable */ /** @@ -151,13 +151,13 @@ class ClientDataResolver { * * A String * * An Array (joined with a new line delimiter to give a string) * * Any object - * @typedef {String|Array|Object} StringResolvable + * @typedef {string|Array|Object} StringResolvable */ /** * Resolves a StringResolvable to a String - * @param {StringResolvable} stringResolvable the string resolvable to resolve - * @returns {String} + * @param {StringResolvable} StringResolvable the string resolvable to resolve + * @returns {string} */ resolveString(data) { if (data instanceof String) { @@ -176,13 +176,13 @@ class ClientDataResolver { * * A Buffer * * The path to a local file * * An URL - * @typedef {String|Buffer} FileResolvable + * @typedef {string|Buffer} FileResolvable */ /** * Resolves a FileResolvable to a Buffer * @param {FileResolvable} fileResolvable the file resolvable to resolve - * @returns {String|Buffer} + * @returns {string|Buffer} */ resolveFile(resource) { if ($string(resource)) { diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index 4a892dddf..2cd6a3932 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -14,17 +14,17 @@ class ClientManager { this.client = client; /** * The heartbeat interval, null if not yet set - * @type {?Number} + * @type {?number} */ this.heartbeatInterval = null; } /** * Connects the Client to the WebSocket - * @param {String} token the authorization token - * @param {Function} resolve function to run when connection is successful - * @param {Function} reject function to run when connection fails - * @returns {null} + * @param {string} token the authorization token + * @param {function} resolve function to run when connection is successful + * @param {function} reject function to run when connection fails + * @returns {void} */ connectToWebSocket(token, resolve, reject) { this.client.token = token; @@ -40,8 +40,8 @@ class ClientManager { /** * Sets up a keep-alive interval to keep the Client's connection valid - * @param {Number} time the interval in milliseconds at which heartbeat packets should be sent - * @returns {null} + * @param {number} time the interval in milliseconds at which heartbeat packets should be sent + * @returns {void} */ setupKeepAlive(time) { this.heartbeatInterval = this.client.setInterval(() => { diff --git a/src/client/rest/RequestHandlers/RequestHandler.js b/src/client/rest/RequestHandlers/RequestHandler.js index 8cf39c8bd..561c0f155 100644 --- a/src/client/rest/RequestHandlers/RequestHandler.js +++ b/src/client/rest/RequestHandlers/RequestHandler.js @@ -19,7 +19,7 @@ class RequestHandler { /** * Whether or not the client is being rate limited on every endpoint. - * @type {Boolean} + * @type {boolean} */ get globalLimit() { return this.restManager.globallyRateLimited; diff --git a/src/client/rest/RequestHandlers/Sequential.js b/src/client/rest/RequestHandlers/Sequential.js index 40c813553..613ccf148 100644 --- a/src/client/rest/RequestHandlers/Sequential.js +++ b/src/client/rest/RequestHandlers/Sequential.js @@ -14,20 +14,20 @@ class SequentialRequestHandler extends RequestHandler { /** * Whether this rate limiter is waiting for a response from a request - * @type {Boolean} + * @type {boolean} */ this.waiting = false; /** * The endpoint that this handler is handling - * @type {String} + * @type {string} */ this.endpoint = endpoint; /** * The time difference between Discord's Dates and the local computer's Dates. A positive number means the local * computer's time is ahead of Discord's. - * @type {Number} + * @type {number} */ this.timeDifference = 0; } diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index cac695c44..d04777c08 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -16,12 +16,12 @@ class ClientVoiceManager { this.client = client; /** * A collection mapping connection IDs to the Connection objects - * @type {Collection} + * @type {Collection} */ this.connections = new Collection(); /** * Pending connection attempts, maps Guild ID to VoiceChannel - * @type {Collection} + * @type {Collection} */ this.pending = new Collection(); } @@ -29,7 +29,7 @@ class ClientVoiceManager { /** * Checks whether a pending request can be processed * @private - * @param {String} guildID The ID of the Guild + * @param {string} guildID The ID of the Guild */ _checkPendingReady(guildID) { const pendingRequest = this.pending.get(guildID); @@ -49,9 +49,9 @@ class ClientVoiceManager { /** * Called when the Client receives information about this voice server update. - * @param {String} guildID the ID of the Guild - * @param {String} token the token to authorise with - * @param {String} endpoint the endpoint to connect to + * @param {string} guildID the ID of the Guild + * @param {string} token the token to authorise with + * @param {string} endpoint the endpoint to connect to */ _receivedVoiceServer(guildID, token, endpoint) { const pendingRequest = this.pending.get(guildID); @@ -66,8 +66,8 @@ class ClientVoiceManager { /** * Called when the Client receives information about the voice state update. - * @param {String} guildID the ID of the Guild - * @param {String} sessionID the session id to authorise with + * @param {string} guildID the ID of the Guild + * @param {string} sessionID the session id to authorise with */ _receivedVoiceStateUpdate(guildID, sessionID) { const pendingRequest = this.pending.get(guildID); @@ -99,7 +99,7 @@ class ClientVoiceManager { /** * Sets up a request to join a voice channel * @param {VoiceChannel} channel the voice channel to join - * @returns {null} + * @returns {void} */ joinChannel(channel) { return new Promise((resolve, reject) => { diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index a84bc89ad..f5416c7ed 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -25,7 +25,7 @@ class VoiceConnection extends EventEmitter { this.player = new DefaultPlayer(this); /** * The endpoint of the connection - * @type {String} + * @type {string} */ this.endpoint = endpoint; /** @@ -41,18 +41,18 @@ class VoiceConnection extends EventEmitter { this.websocket = new VoiceConnectionWebSocket(this, channel.guild.id, token, sessionID, endpoint); /** * Whether or not the connection is ready - * @type {Boolean} + * @type {boolean} */ this.ready = false; /** * The resolve function for the promise associated with creating this connection - * @type {Function} + * @type {function} * @private */ this._resolve = resolve; /** * The reject function for the promise associated with creating this connection - * @type {Function} + * @type {function} * @private */ this._reject = reject; @@ -66,7 +66,7 @@ class VoiceConnection extends EventEmitter { * Executed whenever an error occurs with the UDP/WebSocket sub-client * @private * @param {Error} error - * @returns {null} + * @returns {void} */ _onError(e) { this._reject(e); @@ -82,7 +82,7 @@ class VoiceConnection extends EventEmitter { /** * Disconnects the Client from the Voice Channel * @param {string} [reason='user requested'] the reason of the disconnection - * @returns {null} + * @returns {void} */ disconnect(reason = 'user requested') { this.manager.client.ws.send({ @@ -122,7 +122,7 @@ class VoiceConnection extends EventEmitter { /** * Binds listeners to the WebSocket and UDP sub-clients - * @returns {null} + * @returns {void} * @private */ bindListeners() { @@ -195,7 +195,7 @@ class VoiceConnection extends EventEmitter { * Emitted whenever a user starts/stops speaking * @event VoiceConnection#speaking * @param {User} user the user that has started/stopped speaking - * @param {Boolean} speaking whether or not the user is speaking + * @param {boolean} speaking whether or not the user is speaking */ if (this.ready) { this.emit('speaking', user, data.speaking); @@ -208,7 +208,7 @@ class VoiceConnection extends EventEmitter { /** * Play the given file in the voice connection - * @param {String} filepath the path to the file + * @param {string} filepath the path to the file * @returns {StreamDispatcher} * @example * // play files natively diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index e692fb44a..86deab35b 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -26,7 +26,7 @@ class StreamDispatcher extends EventEmitter { /** * Emitted when the dispatcher starts/stops speaking * @event StreamDispatcher#speaking - * @param {Boolean} value whether or not the dispatcher is speaking + * @param {boolean} value whether or not the dispatcher is speaking */ _setSpeaking(value) { this.speaking = value; @@ -129,7 +129,7 @@ class StreamDispatcher extends EventEmitter { /** * Emitted when the stream wants to give debug information. * @event StreamDispatcher#debug - * @param {String} information the debug information + * @param {string} information the debug information */ this.emit('debug', `triggered terminal state ${state} - stream is now dead`); this._triggered = true; @@ -172,7 +172,7 @@ class StreamDispatcher extends EventEmitter { /** * Stops the current stream permanently and emits an `end` event. - * @returns {null} + * @returns {void} */ end() { this._triggerTerminalState('end', 'user requested'); @@ -180,7 +180,7 @@ class StreamDispatcher extends EventEmitter { /** * Stops sending voice packets to the voice connection (stream may still progress however) - * @returns {null} + * @returns {void} */ pause() { this._pause(true); @@ -188,7 +188,7 @@ class StreamDispatcher extends EventEmitter { /** * Resumes sending voice packets to the voice connection (may be further on in the stream than when paused) - * @returns {null} + * @returns {void} */ resume() { this._pause(false); diff --git a/src/client/voice/receiver/VoiceReceiver.js b/src/client/voice/receiver/VoiceReceiver.js index 4af756777..00563d79b 100644 --- a/src/client/voice/receiver/VoiceReceiver.js +++ b/src/client/voice/receiver/VoiceReceiver.js @@ -89,7 +89,7 @@ class VoiceReceiver extends EventEmitter { /** * Emitted whenever a voice packet cannot be decrypted * @event VoiceReceiver#warn - * @param {String} message the warning message + * @param {string} message the warning message */ return this.emit('warn', 'failed to decrypt voice packet'); } diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index fb3dd1dbd..da53944d2 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -23,33 +23,33 @@ class WebSocketManager { this.packetManager = new PacketManager(this); /** * The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE. - * @type {Number} + * @type {number} */ this.status = Constants.Status.IDLE; /** * The session ID of the connection, null if not yet available. - * @type {?String} + * @type {?string} */ this.sessionID = null; /** * The packet count of the client, null if not yet available. - * @type {?Number} + * @type {?number} */ this.sequence = -1; /** * The gateway address for this WebSocket connection, null if not yet available. - * @type {?String} + * @type {?string} */ this.gateway = null; } /** * Connects the client to a given gateway - * @param {String} gateway the gateway to connect to - * @returns {null} + * @param {string} gateway the gateway to connect to + * @returns {void} */ connect(gateway) { this.status = Constants.Status.CONNECTING; @@ -69,7 +69,7 @@ class WebSocketManager { /** * Sends a packet to the gateway * @param {Object} packet An object that can be JSON stringified - * @returns {null} + * @returns {void} */ send(data) { this._queue.push(JSON.stringify(data)); @@ -100,7 +100,7 @@ class WebSocketManager { /** * Run whenever the gateway connections opens up - * @returns {null} + * @returns {void} */ eventOpen() { if (this.reconnecting) { @@ -112,7 +112,7 @@ class WebSocketManager { /** * Sends a gatway resume packet, in cases of unexpected disconnections. - * @returns {null} + * @returns {void} */ _sendResume() { const payload = { @@ -129,7 +129,7 @@ class WebSocketManager { /** * Sends a new identification packet, in cases of new connections or failed reconnections. - * @returns {null} + * @returns {void} */ _sendNewIdentify() { this.reconnecting = false; @@ -147,7 +147,7 @@ class WebSocketManager { /** * Run whenever the connection to the gateway is closed, it will try to reconnect the client. - * @returns {null} + * @returns {void} */ eventClose(event) { if (event.code === 4004) { @@ -162,7 +162,7 @@ class WebSocketManager { * Run whenever a message is received from the WebSocket. Returns `true` if the message * was handled properly. * @param {Object} data the received websocket data - * @returns {Boolean} + * @returns {boolean} */ eventMessage($event) { let packet; @@ -188,7 +188,7 @@ class WebSocketManager { /** * Run whenever an error occurs with the WebSocket connection. Tries to reconnect - * @returns {null} + * @returns {void} */ eventError(e) { /** @@ -214,7 +214,7 @@ class WebSocketManager { /** * Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares * the `READY` event. - * @returns {null} + * @returns {void} */ checkIfReady() { if (this.status !== Constants.Status.READY && this.status !== Constants.Status.NEARLY) { @@ -238,7 +238,7 @@ class WebSocketManager { /** * Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING. - * @returns {null} + * @returns {void} */ tryReconnect() { this.status = Constants.Status.RECONNECTING; diff --git a/src/client/websocket/packets/handlers/MessageDeleteBulk.js b/src/client/websocket/packets/handlers/MessageDeleteBulk.js index e6d9139ee..b1da3b777 100644 --- a/src/client/websocket/packets/handlers/MessageDeleteBulk.js +++ b/src/client/websocket/packets/handlers/MessageDeleteBulk.js @@ -15,7 +15,7 @@ class MessageDeleteBulkHandler extends AbstractHandler { * Emitted whenever a messages are deleted in bulk * * @event Client#messageDeleteBulk -* @param {Collection} messages The deleted messages, mapped by their ID +* @param {Collection} messages The deleted messages, mapped by their ID */ module.exports = MessageDeleteBulkHandler; diff --git a/src/structures/Channel.js b/src/structures/Channel.js index ab0a9d747..69cff3871 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -19,7 +19,7 @@ class Channel { * * `group` - a Group DM channel * * `text` - a guild text channel * * `voice` - a guild voice channel - * @type {String} + * @type {string} */ this.type = null; if (data) { @@ -30,7 +30,7 @@ class Channel { setup(data) { /** * The unique ID of the channel - * @type {String} + * @type {string} */ this.id = data.id; } diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index ec980d487..3d34b61b0 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -9,12 +9,12 @@ class ClientUser extends User { super.setup(data); /** * Whether or not this account has been verified - * @type {Boolean} + * @type {boolean} */ this.verified = data.verified; /** * The email of this account - * @type {String} + * @type {string} */ this.email = data.email; @@ -25,7 +25,7 @@ class ClientUser extends User { * Set the username of the logged in Client. * Changing usernames in Discord is heavily rate limited, with only 2 requests * every hour. Use this sparingly! - * @param {String} username the new username + * @param {string} username the new username * @returns {Promise} * @example * // set username @@ -40,7 +40,7 @@ class ClientUser extends User { /** * If this user is a "self bot" or logged in using a normal user's details (which should be avoided), you can set the * email here. - * @param {String} email the new email + * @param {string} email the new email * @returns {Promise} * @example * // set email @@ -55,7 +55,7 @@ class ClientUser extends User { /** * If this user is a "self bot" or logged in using a normal user's details (which should be avoided), you can set the * password here. - * @param {String} password the new password + * @param {string} password the new password * @returns {Promise} * @example * // set password @@ -83,8 +83,8 @@ class ClientUser extends User { /** * Set the status and playing game of the logged in client. - * @param {String} [status] the status, can be `online` or `idle`. - * @param {String|Object} [game] the game that is being played + * @param {string} [status] the status, can be `online` or `idle`. + * @param {string|Object} [game] the game that is being played * @returns {Promise} * @example * // set status diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 2638f3753..c71d603f0 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -24,7 +24,7 @@ class DMChannel extends Channel { this.recipient = recipient; /** * The ID of the last sent message, if available - * @type {?String} + * @type {?string} */ this.lastMessageID = data.last_message_id; this.type = 'dm'; @@ -33,7 +33,7 @@ class DMChannel extends Channel { /** * When concatenated with a String, this automatically concatenates the recipient's mention instead of the * DM channel object. - * @returns {String} + * @returns {string} */ toString() { return this.recipient.toString(); diff --git a/src/structures/Emoji.js b/src/structures/Emoji.js index ec7bf9914..9e8d97c7c 100644 --- a/src/structures/Emoji.js +++ b/src/structures/Emoji.js @@ -22,30 +22,30 @@ class Emoji { setup(data) { /** * The ID of the Emoji - * @type {String} + * @type {string} */ this.id = data.id; /** * The name of the Emoji - * @type {String} + * @type {string} */ this.name = data.name; this.roleIDS = data.roles; /** * Whether or not this emoji requires colons surrounding it - * @type {Boolean} + * @type {boolean} */ this.requiresColons = data.require_colons; /** * Whether this emoji is managed by an external service - * @type {Boolean} + * @type {boolean} */ this.managed = data.managed; } /** * A collection of roles this emoji is active for (empty if all). Mapped by role ID. - * @type {Collection} + * @type {Collection} * @readonly */ get roles() { @@ -60,7 +60,7 @@ class Emoji { /** * The URL to the emoji file - * @type {String} + * @type {string} * @readonly */ get url() { @@ -69,7 +69,7 @@ class Emoji { /** * When concatenated with a String, this automatically returns the emoji mention rather than the object. - * @returns {String} + * @returns {string} * @example * // send an emoji: * const emoji = guild.emojis.array()[0]; diff --git a/src/structures/EvaluatedPermissions.js b/src/structures/EvaluatedPermissions.js index 842e61da8..7a71d4fd0 100644 --- a/src/structures/EvaluatedPermissions.js +++ b/src/structures/EvaluatedPermissions.js @@ -13,7 +13,7 @@ class EvaluatedPermissions { /** * A number representing the packed permissions. * @private - * @type {Number} + * @type {number} */ this.permissions = permissions; } @@ -21,7 +21,7 @@ class EvaluatedPermissions { /** * Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user * can perform this or not. - * @returns {Object} + * @returns {Object} */ serialize() { const serializedPermissions = {}; @@ -34,9 +34,9 @@ class EvaluatedPermissions { /** * Checks whether a user has a certain permission, e.g. `READ_MESSAGES`. - * @param {String} permission the permission to check for - * @param {Boolean} [explicit=false] whether the user should explicitly have the permission. - * @returns {Boolean} + * @param {string} permission the permission to check for + * @param {boolean} [explicit=false] whether the user should explicitly have the permission. + * @returns {boolean} */ hasPermission(permission, explicit = false) { if (permission instanceof String || typeof permission === 'string') { diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index 6291e6545..f7be352bc 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -77,7 +77,7 @@ class GroupDMChannel extends Channel { if (!this.recipients) { /** * A collection of the recipients of this DM, mapped by their ID. - * @type {Collection} + * @type {Collection} */ this.recipients = new Collection(); } @@ -90,22 +90,22 @@ class GroupDMChannel extends Channel { } /** * The name of this Group DM, can be null if one isn't set. - * @type {String} + * @type {string} */ this.name = data.name; /** * The ID of this Group DM Channel. - * @type {String} + * @type {string} */ this.id = data.id; /** * A hash of the Group DM icon. - * @type {String} + * @type {string} */ this.icon = data.icon; /** * The ID of the last message in the channel, if one was sent. - * @type {?String} + * @type {?string} */ this.lastMessageID = data.last_message_id; /** diff --git a/src/structures/Guild.js b/src/structures/Guild.js index b918e403e..7dff83dbb 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -34,19 +34,19 @@ class Guild { /** * A Collection of members that are in this Guild. The key is the member's ID, the value is the member. - * @type {Collection} + * @type {Collection} */ this.members = new Collection(); /** * A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel. - * @type {Collection} + * @type {Collection} */ this.channels = new Collection(); /** * A Collection of roles that are in this Guild. The key is the role's ID, the value is the role. - * @type {Collection} + * @type {Collection} */ this.roles = new Collection(); @@ -57,12 +57,12 @@ class Guild { if (data.unavailable) { /** * Whether the Guild is available to access. If it is not available, it indicates a server outage. - * @type {Boolean} + * @type {boolean} */ this.available = false; /** * The Unique ID of the Guild, useful for comparisons. - * @type {String} + * @type {string} */ this.id = data.id; } else { @@ -152,7 +152,7 @@ class Guild { /** * When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object. - * @returns {String} + * @returns {string} * @example * // logs: Hello from My Guild! * console.log(`Hello from ${guild}!`); @@ -181,7 +181,7 @@ class Guild { * it is advisable to just compare `guild.id === guild2.id` as it is much faster and is often * what most users need. * @param {Guild} guild the guild to compare - * @returns {Boolean} + * @returns {boolean} */ equals(data) { let base = @@ -220,7 +220,7 @@ class Guild { * Emitted once a Guild Member starts/stops speaking * @event Client#guildMemberSpeaking * @param {GuildMember} member the member that started/stopped speaking - * @param {Boolean} speaking whether or not the member is speaking + * @param {boolean} speaking whether or not the member is speaking */ this.client.emit(Constants.Events.GUILD_MEMBER_SPEAKING, member, speaking); } @@ -228,8 +228,8 @@ class Guild { /** * Sets up the Guild - * @param {any} data - * @returns {null} + * @param {*} data + * @returns {void} * @private */ setup(data) { @@ -237,33 +237,33 @@ class Guild { this.available = !data.unavailable; /** * The hash of the guild splash image, or null if no splash (VIP only) - * @type {?String} + * @type {?string} */ this.splash = data.splash; /** * The region the guild is located in - * @type {String} + * @type {string} */ this.region = data.region; /** * The name of the guild - * @type {String} + * @type {string} */ this.name = data.name; /** * The full amount of members in this Guild as of `READY` - * @type {Number} + * @type {number} */ this.memberCount = data.member_count; /** * Whether the guild is "large" (has more than 250 members) - * @type {Boolean} + * @type {boolean} */ this.large = data.large; this._joinDate = new Date(data.joined_at).getTime(); /** * The hash of the guild icon, or null if there is no icon. - * @type {?String} + * @type {?string} */ this.icon = data.icon; /** @@ -281,22 +281,22 @@ class Guild { } /** * The time in seconds before a user is counted as "away from keyboard". - * @type {?Number} + * @type {?number} */ this.afkTimeout = data.afk_timeout; /** * The ID of the voice channel where AFK members are moved. - * @type {?String} + * @type {?string} */ this.afkChannelID = data.afk_channel_id; /** * Whether embedded images are enabled on this guild. - * @type {Boolean} + * @type {boolean} */ this.embedEnabled = data.embed_enabled; /** * The verification level of the guild. - * @type {Number} + * @type {number} */ this.verificationLevel = data.verification_level; this.features = data.features || []; @@ -365,8 +365,8 @@ class Guild { /** * Creates a new Channel in the Guild. - * @param {String} name the name of the new channel. - * @param {String} type the type of the new channel, either `text` or `voice`. + * @param {string} name the name of the new channel. + * @param {string} type the type of the new channel, either `text` or `voice`. * @returns {Promise} * @example * // create a new text channel @@ -436,7 +436,7 @@ class Guild { /** * Edit the name of the Guild. - * @param {String} name the new name of the Guild. + * @param {string} name the new name of the Guild. * @returns {Promise} * @example * // edit the guild name @@ -492,7 +492,7 @@ class Guild { /** * Edit the AFK timeout of the Guild. - * @param {Number} afkTimeout the time in seconds that a user must be idle to be considered AFK. + * @param {number} afkTimeout the time in seconds that a user must be idle to be considered AFK. * @returns {Promise} * @example * // edit the guild AFK channel @@ -562,7 +562,7 @@ class Guild { /** * Fetch a Collection of banned users in this Guild. - * @returns {Promise, Error>} + * @returns {Promise, Error>} */ fetchBans() { return this.client.rest.methods.getGuildBans(this); @@ -570,7 +570,7 @@ class Guild { /** * Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes. - * @returns {Promise, Error>} + * @returns {Promise, Error>} */ fetchInvites() { return this.client.rest.methods.getGuildInvites(this); @@ -579,7 +579,7 @@ class Guild { /** * Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members, * this should not be necessary. - * @param {String} [query=''] An optional query to provide when fetching members + * @param {string} [query=''] An optional query to provide when fetching members * @returns {Promise} */ fetchMembers(query = '') { @@ -606,7 +606,7 @@ class Guild { /** * Gets the URL to this guild's icon (if it has one, otherwise it returns null) - * @type {?String} + * @type {?string} * @readonly */ get iconURL() { diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index e39d1bb89..d5bb55fd8 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -33,23 +33,23 @@ class GuildChannel extends Channel { super.setup(data); /** * The topic of the Guild Channel, if there is one. - * @type {?String} + * @type {?string} */ this.topic = data.topic; /** * The position of the channel in the list. - * @type {Number} + * @type {number} */ this.position = data.position; /** * The name of the Guild Channel - * @type {String} + * @type {string} */ this.name = data.name; this.ow = data.permission_overwrites; /** * A map of permission overwrites in this channel for roles and users. - * @type {Collection} + * @type {Collection} */ this.permissionOverwrites = new Collection(); if (data.permission_overwrites) { @@ -63,7 +63,7 @@ class GuildChannel extends Channel { * Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel. * In most cases, a simple `channel.id === channel2.id` will do, and is much faster too. * @param {GuildChannel} channel the channel to compare this channel to - * @returns {Boolean} + * @returns {boolean} */ equals(other) { let base = ( @@ -222,7 +222,7 @@ class GuildChannel extends Channel { /** * Set a new name for the Guild Channel - * @param {String} name the new name for the guild channel + * @param {string} name the new name for the guild channel * @returns {Promise} * @example * // set a new channel name @@ -236,7 +236,7 @@ class GuildChannel extends Channel { /** * Set a new position for the Guild Channel - * @param {Number} position the new position for the guild channel + * @param {number} position the new position for the guild channel * @returns {Promise} * @example * // set a new channel position @@ -250,7 +250,7 @@ class GuildChannel extends Channel { /** * Set a new topic for the Guild Channel - * @param {String} topic the new topic for the guild channel + * @param {string} topic the new topic for the guild channel * @returns {Promise} * @example * // set a new channel topic @@ -264,7 +264,7 @@ class GuildChannel extends Channel { /** * When concatenated with a String, this automatically returns the Channel's mention instead of the Channel object. - * @returns {String} + * @returns {string} * @example * // Outputs: Hello from #general * console.log(`Hello from ${channel}`); diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index e4aed5399..643596147 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -31,43 +31,43 @@ class GuildMember { this.user = data.user; /** * Whether this member is deafened server-wide - * @type {Boolean} + * @type {boolean} */ this.serverDeaf = data.deaf; /** * Whether this member is muted server-wide - * @type {Boolean} + * @type {boolean} */ this.serverMute = data.mute; /** * Whether this member is self-muted - * @type {Boolean} + * @type {boolean} */ this.selfMute = data.self_mute; /** * Whether this member is self-deafened - * @type {Boolean} + * @type {boolean} */ this.selfDeaf = data.self_deaf; /** * The voice session ID of this member, if any - * @type {?String} + * @type {?string} */ this.voiceSessionID = data.session_id; /** * The voice channel ID of this member, if any - * @type {?String} + * @type {?string} */ this.voiceChannelID = data.channel_id; this._joinDate = new Date(data.joined_at).getTime(); /** * Whether this meember is speaking - * @type {?Boolean} + * @type {?boolean} */ this.speaking = this.speaking; /** * The nickname of this Guild Member, if they have one - * @type {?String} + * @type {?string} */ this.nickname = data.nick; this._roles = data.roles; @@ -106,7 +106,7 @@ class GuildMember { /** * Whether this member is muted in any way - * @type {Boolean} + * @type {boolean} * @readonly */ get mute() { @@ -115,7 +115,7 @@ class GuildMember { /** * Whether this member is deafened in any way - * @type {Boolean} + * @type {boolean} * @readonly */ get deaf() { @@ -133,7 +133,7 @@ class GuildMember { /** * The ID of this User - * @type {String} + * @type {string} * @readonly */ get id() { @@ -142,7 +142,7 @@ class GuildMember { /** * Mute/unmute a user - * @param {Boolean} mute whether or not the member should be muted + * @param {boolean} mute whether or not the member should be muted * @returns {Promise} */ setMute(mute) { @@ -151,7 +151,7 @@ class GuildMember { /** * Deafen/undeafen a user - * @param {Boolean} deaf whether or not the member should be deafened + * @param {boolean} deaf whether or not the member should be deafened * @returns {Promise} */ setDeaf(deaf) { @@ -169,7 +169,7 @@ class GuildMember { /** * Sets the Roles applied to the member. - * @param {Collection|Array} roles the roles to apply + * @param {Collection|Array} roles the roles to apply * @returns {Promise} */ setRoles(roles) { @@ -178,7 +178,7 @@ class GuildMember { /** * Set the nickname for the Guild Member - * @param {String} nick the nickname for the Guild Member + * @param {string} nick the nickname for the Guild Member * @returns {Promise} */ setNickname(nick) { diff --git a/src/structures/Invite.js b/src/structures/Invite.js index df6ba861e..c82ae92fa 100644 --- a/src/structures/Invite.js +++ b/src/structures/Invite.js @@ -38,32 +38,32 @@ class Invite { setup(data) { /** * The maximum age of the invite, in seconds - * @type {?Number} + * @type {?number} */ this.maxAge = data.max_age; /** * The code for this invite - * @type {String} + * @type {string} */ this.code = data.code; this._creationDate = new Date(data.created_at).getTime(); /** * Whether or not this invite is temporary - * @type {Boolean} + * @type {boolean} */ this.temporary = data.temporary; /** * How many times this invite has been used - * @type {Number} + * @type {number} */ this.uses = data.uses; /** * The maximum uses of this invite - * @type {Number} + * @type {number} */ this.maxUses = data.max_uses; diff --git a/src/structures/Message.js b/src/structures/Message.js index 1c80e2089..24c7cd46f 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -34,7 +34,7 @@ class Message { setup(data) { /** * Whether or not this message is pinned - * @type {Boolean} + * @type {boolean} */ this.pinned = data.pinned; /** @@ -52,19 +52,19 @@ class Message { } /** * The content of the message - * @type {String} + * @type {string} */ this.content = data.content; this._timestamp = new Date(data.timestamp).getTime(); this._editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp).getTime() : null; /** * Whether or not the message was Text-To-Speech - * @type {Boolean} + * @type {boolean} */ this.tts = data.tts; /** * A random number used for checking message delivery - * @type {String} + * @type {string} */ this.nonce = data.nonce; /** @@ -74,7 +74,7 @@ class Message { this.embeds = data.embeds.map(e => new Embed(this, e)); /** * A collection of attachments in the message - e.g. Pictures - mapped by their ID. - * @type {Collection} + * @type {Collection} */ this.attachments = new Collection(); for (const attachment of data.attachments) { @@ -83,11 +83,11 @@ class Message { /** * An object containing a further users, roles or channels collections * @type {Object} - * @property {Collection} mentions.users Mentioned users, maps their ID to the user object. - * @property {Collection} mentions.roles Mentioned roles, maps their ID to the role object. - * @property {Collection} + * @property {Collection} mentions.users Mentioned users, maps their ID to the user object. + * @property {Collection} mentions.roles Mentioned roles, maps their ID to the role object. + * @property {Collection} * mentions.channels Mentioned channels, maps their ID to the channel object. - * @property {Boolean} mentions.everyone whether or not @everyone was mentioned. + * @property {boolean} mentions.everyone whether or not @everyone was mentioned. */ this.mentions = { users: new Collection(), @@ -97,7 +97,7 @@ class Message { }; /** * The ID of the message (unique in the channel it was sent) - * @type {String} + * @type {string} */ this.id = data.id; @@ -132,7 +132,7 @@ class Message { /** * Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications) - * @type {Boolean} + * @type {boolean} */ this.system = false; if (data.type === 6) { @@ -234,7 +234,7 @@ class Message { * method allows you to see if there are differences in content, embeds, attachments, nonce and tts properties. * @param {Message} message The message to compare it to * @param {Object} rawData Raw data passed through the WebSocket about this message - * @returns {Boolean} + * @returns {boolean} */ equals(message, rawData) { const embedUpdate = !message.author && !message.attachments; @@ -263,7 +263,7 @@ class Message { /** * Deletes the message - * @param {Number} [timeout=0] How long to wait to delete the message in milliseconds + * @param {number} [timeout=0] How long to wait to delete the message in milliseconds * @returns {Promise} * @example * // delete a message @@ -283,7 +283,7 @@ class Message { /** * Edit the content of a message - * @param {String} content the new content of a message + * @param {string} content the new content of a message * @returns {Promise} * @example * // update the content of a message @@ -297,7 +297,7 @@ class Message { /** * Reply to a message - * @param {String} content the content of the message + * @param {string} content the content of the message * @param {MessageOptions} [options = {}] the options to provide * @returns {Promise} * @example diff --git a/src/structures/MessageAttachment.js b/src/structures/MessageAttachment.js index 182fabe8e..ad74479e8 100644 --- a/src/structures/MessageAttachment.js +++ b/src/structures/MessageAttachment.js @@ -19,37 +19,37 @@ class MessageAttachment { setup(data) { /** * The ID of this attachment - * @type {String} + * @type {string} */ this.id = data.id; /** * The file name of this attachment - * @type {String} + * @type {string} */ this.filename = data.filename; /** * The size of this attachment in bytes - * @type {Number} + * @type {number} */ this.filesize = data.size; /** * The URL to this attachment - * @type {String} + * @type {string} */ this.url = data.url; /** * The Proxy URL to this attachment - * @type {String} + * @type {string} */ this.proxyURL = data.url; /** * The height of this attachment (if an image) - * @type {?Number} + * @type {?number} */ this.height = data.height; /** * The width of this attachment (if an image) - * @type {?Number} + * @type {?number} */ this.width = data.width; } diff --git a/src/structures/MessageEmbed.js b/src/structures/MessageEmbed.js index 0edc9663d..ed426da2e 100644 --- a/src/structures/MessageEmbed.js +++ b/src/structures/MessageEmbed.js @@ -14,22 +14,22 @@ class MessageEmbedThumbnail { setup(data) { /** * The URL for this thumbnail - * @type {String} + * @type {string} */ this.url = data.url; /** * The Proxy URL for this thumbnail - * @type {String} + * @type {string} */ this.proxyURL = data.proxy_url; /** * The height of the thumbnail - * @type {Number} + * @type {number} */ this.height = data.height; /** * The width of the thumbnail - * @type {Number} + * @type {number} */ this.width = data.width; } @@ -51,12 +51,12 @@ class MessageEmbedProvider { setup(data) { /** * The name of this provider - * @type {String} + * @type {string} */ this.name = data.name; /** * The URL of this provider - * @type {String} + * @type {string} */ this.url = data.url; } @@ -83,22 +83,22 @@ class MessageEmbed { setup(data) { /** * The title of this embed, if there is one - * @type {?String} + * @type {?string} */ this.title = data.title; /** * The type of this embed - * @type {String} + * @type {string} */ this.type = data.type; /** * The description of this embed, if there is one - * @type {?String} + * @type {?string} */ this.description = data.description; /** * The URL of this embed - * @type {String} + * @type {string} */ this.url = data.url; if (data.thumbnail) { diff --git a/src/structures/PartialGuild.js b/src/structures/PartialGuild.js index 881b8b71a..ac6334abd 100644 --- a/src/structures/PartialGuild.js +++ b/src/structures/PartialGuild.js @@ -21,22 +21,22 @@ class PartialGuild { setup(data) { /** * The hash of the guild splash image, or null if no splash (VIP only) - * @type {?String} + * @type {?string} */ this.splash = data.splash; /** * The ID of this guild - * @type {String} + * @type {string} */ this.id = data.id; /** * The hash of this guild's icon, or null if there is none. - * @type {?String} + * @type {?string} */ this.icon = data.icon; /** * The name of this guild - * @type {String} + * @type {string} */ this.name = data.name; } diff --git a/src/structures/PartialGuildChannel.js b/src/structures/PartialGuildChannel.js index 4aca8c901..01a5ae73d 100644 --- a/src/structures/PartialGuildChannel.js +++ b/src/structures/PartialGuildChannel.js @@ -20,17 +20,17 @@ class PartialGuildChannel { setup(data) { /** * The ID of this Guild Channel - * @type {String} + * @type {string} */ this.id = data.id; /** * The name of this Guild Channel - * @type {String} + * @type {string} */ this.name = data.name; /** * The type of this Guild Channel - `text` or `voice` - * @type {String} + * @type {string} */ this.type = Constants.ChannelTypes.text === data.type ? 'text' : 'voice'; } diff --git a/src/structures/PermissionOverwrites.js b/src/structures/PermissionOverwrites.js index 665df7b31..b15e27889 100644 --- a/src/structures/PermissionOverwrites.js +++ b/src/structures/PermissionOverwrites.js @@ -16,12 +16,12 @@ class PermissionOverwrites { setup(data) { /** * The type of this overwrite - * @type {String} + * @type {string} */ this.type = data.type; /** * The ID of this overwrite, either a User ID or a Role ID - * @type {String} + * @type {string} */ this.id = data.id; this.denyData = data.deny; diff --git a/src/structures/Role.js b/src/structures/Role.js index eab7af139..472ff1322 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -36,37 +36,37 @@ class Role { setup(data) { /** * The ID of the role (unique to the guild it is part of) - * @type {String} + * @type {string} */ this.id = data.id; /** * The name of the role - * @type {String} + * @type {string} */ this.name = data.name; /** * The base 10 color of the role - * @type {Number} + * @type {number} */ this.color = data.color; /** * If true, users that are part of this role will appear in a separate category in the users list - * @type {Boolean} + * @type {boolean} */ this.hoist = data.hoist; /** * The position of the role in the role manager - * @type {Number} + * @type {number} */ this.position = data.position; /** * The evaluated permissions number - * @type {Number} + * @type {number} */ this.permissions = data.permissions; /** * Whether or not the role is managed by an external service - * @type {Boolean} + * @type {boolean} */ this.managed = data.managed; } @@ -100,7 +100,7 @@ class Role { /** * Set a new name for the role - * @param {String} name the new name of the role + * @param {string} name the new name of the role * @returns {Promise} * @example * // set the name of the role @@ -114,7 +114,7 @@ class Role { /** * Set a new color for the role - * @param {Number|String} color the new color for the role, either a hex string or a base 10 number + * @param {number|string} color the new color for the role, either a hex string or a base 10 number * @returns {Promise} * @example * // set the color of a role @@ -128,7 +128,7 @@ class Role { /** * Set whether or not the role should be hoisted - * @param {Boolean} hoist whether or not to hoist the role + * @param {boolean} hoist whether or not to hoist the role * @returns {Promise} * @example * // set the hoist of the role @@ -142,7 +142,7 @@ class Role { /** * Set the position of the role - * @param {Number} position the position of the role + * @param {number} position the position of the role * @returns {Promise} * @example * // set the position of the role @@ -156,7 +156,7 @@ class Role { /** * Set the permissions of the role - * @param {Array} permissions the permissions of the role + * @param {Array} permissions the permissions of the role * @returns {Promise} * @example * // set the permissions of the role @@ -170,7 +170,7 @@ class Role { /** * Get an object mapping permission names to whether or not the role enables that permission - * @returns {Object} + * @returns {Object} * @example * // print the serialized role * console.log(role.serialize()); @@ -186,9 +186,9 @@ class Role { /** * Whether or not the role includes the given permission - * @param {String} permission the name of the permission to test - * @param {Boolean} [explicit=false] whether or not the inclusion of the permission is explicit - * @returns {Boolean} + * @param {string} permission the name of the permission to test + * @param {boolean} [explicit=false] whether or not the inclusion of the permission is explicit + * @returns {boolean} * @example * // see if a role can ban a member * if (role.hasPermission('BAN_MEMBERS')) { @@ -217,7 +217,7 @@ class Role { /** * When concatenated with a String, this automatically concatenates the Role mention rather than the Role object. - * @returns {String} + * @returns {string} */ toString() { return `<@&${this.id}>`; @@ -225,7 +225,7 @@ class Role { /** * The hexadecimal version of the role color, with a leading hashtag. - * @type {String} + * @type {string} * @readonly */ get hexColor() { diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index f8057bc08..8aab8454e 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -18,7 +18,7 @@ class TextChannel extends GuildChannel { super.setup(data); /** * The ID of the last message in the channel, if one was sent. - * @type {?String} + * @type {?string} */ this.lastMessageID = data.last_message_id; this.type = 'text'; diff --git a/src/structures/User.js b/src/structures/User.js index 4dce49145..769d5350b 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -16,27 +16,27 @@ class User { setup(data) { /** * The username of the User - * @type {String} + * @type {string} */ this.username = data.username; /** * The ID of the User - * @type {String} + * @type {string} */ this.id = data.id; /** * A discriminator based on username for the User - * @type {String} + * @type {string} */ this.discriminator = data.discriminator; /** * The ID of the user's avatar - * @type {String} + * @type {string} */ this.avatar = data.avatar; /** * Whether or not the User is a Bot. - * @type {Boolean} + * @type {boolean} */ this.bot = Boolean(data.bot); /** @@ -45,19 +45,19 @@ class User { * * **`online`** - user is online * * **`offline`** - user is offline * * **`idle`** - user is AFK - * @type {String} + * @type {string} */ this.status = data.status || this.status || 'offline'; /** * The game that the user is playing, `null` if they aren't playing a game. - * @type {String} + * @type {string} */ this.game = data.game || this.game; } /** * When concatenated with a String, this automatically concatenates the User's mention instead of the User object. - * @returns {String} + * @returns {string} * @example * // logs: Hello from <@123456789>! * console.log(`Hello from ${user}!`); @@ -68,7 +68,7 @@ class User { /** * A link to the user's avatar (if they have one, otherwise null) - * @type {?String} + * @type {?string} * @readonly */ get avatarURL() { @@ -90,7 +90,7 @@ class User { * 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. * @param {User} user the user to compare - * @returns {Boolean} + * @returns {boolean} */ equals(user) { let base = ( diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index 2266cc524..1511fdfad 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -10,7 +10,7 @@ class VoiceChannel extends GuildChannel { super(guild, data); /** * The members in this Voice Channel. - * @type {Collection} + * @type {Collection} */ this.members = new Collection(); } @@ -19,12 +19,12 @@ class VoiceChannel extends GuildChannel { super.setup(data); /** * The bitrate of this voice channel - * @type {Number} + * @type {number} */ this.bitrate = data.bitrate; /** * The maximum amount of users allowed in this channel - 0 means unlimited. - * @type {Number} + * @type {number} */ this.userLimit = data.user_limit; this.type = 'voice'; @@ -32,7 +32,7 @@ class VoiceChannel extends GuildChannel { /** * Sets the bitrate of the channel - * @param {Number} bitrate the new bitrate + * @param {number} bitrate the new bitrate * @returns {Promise} * @example * // set the bitrate of a voice channel @@ -59,7 +59,7 @@ class VoiceChannel extends GuildChannel { /** * Leaves this voice channel - * @returns {null} + * @returns {void} * @example * // leave a voice channel * voiceChannel.leave(); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 2f70ffdcd..211a8742a 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -13,7 +13,7 @@ const EventEmitter = require('events').EventEmitter; * return false; // failed the filter test * } * ``` - * @typedef {Function} CollectorFilterFunction + * @typedef {function} CollectorFilterFunction */ /** @@ -52,14 +52,14 @@ class MessageCollector extends EventEmitter { this.options = options; /** * Whether this collector has stopped collecting Messages. - * @type {Boolean} + * @type {boolean} */ this.ended = false; this.listener = (message => this.verify(message)); this.channel.client.on('message', this.listener); /** * A collection of collected messages, mapped by message ID. - * @type {Collection} + * @type {Collection} */ this.collected = new Collection(); if (options.time) { @@ -71,7 +71,7 @@ class MessageCollector extends EventEmitter { * Verifies a message against the filter and options * @private * @param {Message} message - * @returns {Boolean} + * @returns {boolean} */ verify(message) { if (this.channel ? this.channel.id !== message.channel.id : false) { @@ -109,10 +109,10 @@ class MessageCollector extends EventEmitter { this.channel.client.removeListener('message', this.listener); /** * Emitted when the Collector stops collecting. - * @param {Collection} collection A collection of messages collected + * @param {Collection} collection A collection of messages collected * during the lifetime of the Collector. * Mapped by the ID of the Messages. - * @param {String} reason The reason for the end of the collector. If it ended because it reached the specified time + * @param {string} reason The reason for the end of the collector. If it ended because it reached the specified time * limit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it * ended because it reached its message limit, it will be `limit`. * @event MessageCollector#end @@ -130,15 +130,15 @@ class TextBasedChannel { constructor() { /** * A Collection containing the messages sent to this channel. - * @type {Collection} + * @type {Collection} */ this.messages = new Collection(); } /** * Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after. - * @param {Map|Array} messages the messages to delete - * @returns {Collection} + * @param {Map|Array} messages the messages to delete + * @returns {Collection} */ bulkDelete(messages) { if (messages instanceof Map) { @@ -162,7 +162,7 @@ class TextBasedChannel { */ /** * Send a message to this channel - * @param {String} content the content to send + * @param {string} content the content to send * @param {MessageOptions} [options={}] the options to provide * @returns {Promise} * @example @@ -176,7 +176,7 @@ class TextBasedChannel { } /** * Send a text-to-speech message to this channel - * @param {String} content the content to send + * @param {string} content the content to send * @param {MessageOptions} [options={}] the options to provide * @returns {Promise} * @example @@ -191,7 +191,7 @@ class TextBasedChannel { /** * Send a file to this channel * @param {FileResolvable} attachment The file to send - * @param {String} [fileName="file.jpg"] The name and extension of the file + * @param {string} [fileName="file.jpg"] The name and extension of the file * @returns {Promise} */ sendFile(attachment, fileName) { @@ -232,7 +232,7 @@ class TextBasedChannel { /** * Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects. * @param {ChannelLogsQueryOptions} [options={}] the query parameters to pass in - * @returns {Promise, Error>} + * @returns {Promise, Error>} * @example * // get messages * channel.fetchMessages({limit: 10}) @@ -257,8 +257,8 @@ class TextBasedChannel { /** * Starts a typing indicator in the channel. - * @param {Number} [count] The number of times startTyping should be considered to have been called - * @returns {null} + * @param {number} [count] The number of times startTyping should be considered to have been called + * @returns {void} * @example * // start typing in a channel * channel.startTyping(); @@ -283,8 +283,8 @@ class TextBasedChannel { * Stops the typing indicator in the channel. * The indicator will only stop if this is called as many times as startTyping(). * It can take a few seconds for the Client User to stop typing. - * @param {Boolean} [force=false] whether or not to force the indicator to stop regardless of call count - * @returns {null} + * @param {boolean} [force=false] whether or not to force the indicator to stop regardless of call count + * @returns {void} * @example * // stop typing in a channel * channel.stopTyping(); @@ -305,7 +305,7 @@ class TextBasedChannel { /** * Whether or not the typing indicator is being shown in the channel. - * @type {Boolean} + * @type {boolean} */ get typing() { return this.client.user._typing.has(this.id); @@ -313,7 +313,7 @@ class TextBasedChannel { /** * Number of times `startTyping` has been called. - * @type {Number} + * @type {number} */ get typingCount() { if (this.client.user._typing.has(this.id)) return this.client.user._typing.get(this.id).count; @@ -354,7 +354,7 @@ class TextBasedChannel { * filter. * @param {CollectorFilterFunction} filter the filter function to use * @param {AwaitMessagesOptions} [options={}] optional options to pass to the internal collector - * @returns {Promise>} + * @returns {Promise>} * @example * // await !vote messages * const filter = m => m.content.startsWith('!vote'); @@ -394,7 +394,7 @@ class TextBasedChannel { /** * Fetches the pinned messages of this Channel and returns a Collection of them. - * @returns {Promise, Error>} + * @returns {Promise, Error>} */ fetchPinnedMessages() { return new Promise((resolve, reject) => { diff --git a/src/util/Collection.js b/src/util/Collection.js index 67168cb24..b967659a3 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -62,7 +62,7 @@ class Collection extends Map { /** * The length (size) of this collection. * @readonly - * @type {Number} + * @type {number} */ get length() { return this.size; @@ -70,8 +70,8 @@ class Collection extends Map { /** * Returns an array of items where `item[key] === value` of the collection - * @param {String} key the key to filter by - * @param {any} value the expected value + * @param {string} key the key to filter by + * @param {*} value the expected value * @returns {Array} * @example * collection.getAll('username', 'Bob'); @@ -90,8 +90,8 @@ class Collection extends Map { /** * Returns a single item where `item[key] === value` - * @param {String} key the key to filter by - * @param {any} value the expected value + * @param {string} key the key to filter by + * @param {*} value the expected value * @returns {Object} * @example * collection.get('id', '123123...'); @@ -109,9 +109,9 @@ class Collection extends Map { /** * Returns true if the collection has an item where `item[key] === value` - * @param {String} key the key to filter by - * @param {any} value the expected value - * @returns {Object} + * @param {string} key the key to filter by + * @param {*} value the expected value + * @returns {boolean} * @example * if (collection.exists('id', '123123...')) { * console.log('user here!'); @@ -129,7 +129,7 @@ class Collection extends Map { * Identical to * [Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), * but returns a Collection instead of an Array. - * @param {Function} callback the callback used to filter + * @param {function} callback the callback used to filter * @param {Object} [thisArg] value to set as this when filtering * @returns {Collection} */ From ec0a5cdfbcf4fa20bfb1c18959c0103d3841f970 Mon Sep 17 00:00:00 2001 From: FrankenMan Date: Sat, 3 Sep 2016 05:00:01 -0800 Subject: [PATCH 292/324] Reworded third sentence to be more grammatically correct (#584) --- docs/custom/documents/updating.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/custom/documents/updating.md b/docs/custom/documents/updating.md index 78fa39bc5..f8c2abf11 100644 --- a/docs/custom/documents/updating.md +++ b/docs/custom/documents/updating.md @@ -1,6 +1,6 @@ # About the Rewrite The rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable. -It's been written completely from scratch and should be much more stable, fixing caching issues that affected +It's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected older versions and it also has support for new Discord Features, such as emojis. ## Upgrading your code @@ -8,4 +8,4 @@ The rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMes from the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full extent of these changes by looking at the classes in the documentation. -Additionally, some event names and parameters have changed - you should revisit these. \ No newline at end of file +Additionally, some event names and parameters have changed - you should revisit these. From d97ce2e18111d8ae65042e2178f73a78249f4025 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 3 Sep 2016 11:58:28 -0400 Subject: [PATCH 293/324] Remove all string object references (#586) --- src/client/ClientDataResolver.js | 22 ++++++++------------ src/client/rest/RESTMethods.js | 2 +- src/structures/DMChannel.js | 2 +- src/structures/Emoji.js | 2 +- src/structures/EvaluatedPermissions.js | 2 +- src/structures/Guild.js | 2 +- src/structures/GuildChannel.js | 2 +- src/structures/Role.js | 4 ++-- src/structures/User.js | 2 +- src/structures/interface/TextBasedChannel.js | 2 +- 10 files changed, 19 insertions(+), 23 deletions(-) diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index bac611258..04ff7aeb6 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -10,10 +10,6 @@ const Guild = getStructure('Guild'); const Channel = getStructure('Channel'); const GuildMember = getStructure('GuildMember'); -function $string(obj) { - return (typeof obj === 'string' || obj instanceof String); -} - /** * The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g. * extracting a User from a Message object. @@ -31,7 +27,7 @@ class ClientDataResolver { * * A Message (resolves to the message author) * * A Guild (owner of the guild) * * A Guild Member - * @typedef {User|String|Message|Guild|GuildMember} UserResolvable + * @typedef {User|string|Message|Guild|GuildMember} UserResolvable */ /** @@ -42,7 +38,7 @@ class ClientDataResolver { resolveUser(user) { if (user instanceof User) { return user; - } else if ($string(user)) { + } else if (typeof user === 'string') { return this.client.users.get(user); } else if (user instanceof Message) { return user.author; @@ -105,7 +101,7 @@ class ClientDataResolver { /** * Data that resolves to give a Base64 string, typically for image uploading. This can be: * * A Buffer - * * A Base64 String + * * A Base64 string * @typedef {Buffer|string} Base64Resolvable */ @@ -139,7 +135,7 @@ class ClientDataResolver { return channel; } - if ($string(channel)) { + if (typeof channel === 'string') { return this.client.channels.get(channel.id); } @@ -147,20 +143,20 @@ class ClientDataResolver { } /** - * Data that can be resolved to give a String. This can be: - * * A String + * Data that can be resolved to give a string. This can be: + * * A string * * An Array (joined with a new line delimiter to give a string) * * Any object * @typedef {string|Array|Object} StringResolvable */ /** - * Resolves a StringResolvable to a String + * Resolves a StringResolvable to a string * @param {StringResolvable} StringResolvable the string resolvable to resolve * @returns {string} */ resolveString(data) { - if (data instanceof String) { + if (typeof data === 'string') { return data; } @@ -185,7 +181,7 @@ class ClientDataResolver { * @returns {string|Buffer} */ resolveFile(resource) { - if ($string(resource)) { + if (typeof resource === 'string') { return new Promise((resolve, reject) => { if (/^https?:\/\//.test(resource)) { request.get(resource) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index cf0cb32a2..68736fc12 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -464,7 +464,7 @@ class RESTMethods { if (_data.permissions) { let perms = 0; for (let perm of _data.permissions) { - if (perm instanceof String || typeof perm === 'string') { + if (typeof perm === 'string') { perm = Constants.PermissionFlags[perm]; } perms |= perm; diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index c71d603f0..8cf633f2a 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -31,7 +31,7 @@ class DMChannel extends Channel { } /** - * When concatenated with a String, this automatically concatenates the recipient's mention instead of the + * When concatenated with a string, this automatically concatenates the recipient's mention instead of the * DM channel object. * @returns {string} */ diff --git a/src/structures/Emoji.js b/src/structures/Emoji.js index 9e8d97c7c..6a9660749 100644 --- a/src/structures/Emoji.js +++ b/src/structures/Emoji.js @@ -68,7 +68,7 @@ class Emoji { } /** - * When concatenated with a String, this automatically returns the emoji mention rather than the object. + * When concatenated with a string, this automatically returns the emoji mention rather than the object. * @returns {string} * @example * // send an emoji: diff --git a/src/structures/EvaluatedPermissions.js b/src/structures/EvaluatedPermissions.js index 7a71d4fd0..bcb9ac385 100644 --- a/src/structures/EvaluatedPermissions.js +++ b/src/structures/EvaluatedPermissions.js @@ -39,7 +39,7 @@ class EvaluatedPermissions { * @returns {boolean} */ hasPermission(permission, explicit = false) { - if (permission instanceof String || typeof permission === 'string') { + if (typeof permission === 'string') { permission = Constants.PermissionFlags[permission]; } diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 7dff83dbb..458539ffd 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -151,7 +151,7 @@ class Guild { } /** - * When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object. + * When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object. * @returns {string} * @example * // logs: Hello from My Guild! diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index d5bb55fd8..c10cade55 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -263,7 +263,7 @@ class GuildChannel extends Channel { } /** - * When concatenated with a String, this automatically returns the Channel's mention instead of the Channel object. + * When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object. * @returns {string} * @example * // Outputs: Hello from #general diff --git a/src/structures/Role.js b/src/structures/Role.js index 472ff1322..f8407e8b2 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -198,7 +198,7 @@ class Role { * } */ hasPermission(permission, explicit = false) { - if (permission instanceof String || typeof permission === 'string') { + if (typeof permission === 'string') { permission = Constants.PermissionFlags[permission]; } @@ -216,7 +216,7 @@ class Role { } /** - * When concatenated with a String, this automatically concatenates the Role mention rather than the Role object. + * When concatenated with a string, this automatically concatenates the Role mention rather than the Role object. * @returns {string} */ toString() { diff --git a/src/structures/User.js b/src/structures/User.js index 769d5350b..34a09cb54 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -56,7 +56,7 @@ class User { } /** - * When concatenated with a String, this automatically concatenates the User's mention instead of the User object. + * When concatenated with a string, this automatically concatenates the User's mention instead of the User object. * @returns {string} * @example * // logs: Hello from <@123456789>! diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 211a8742a..755b0ef76 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -196,7 +196,7 @@ class TextBasedChannel { */ sendFile(attachment, fileName) { if (!fileName) { - if (attachment instanceof String || typeof attachment === 'string') { + if (typeof attachment === 'string') { fileName = path.basename(attachment); } else if (attachment && attachment.path) { fileName = path.basename(attachment.path); From 02324fbecbd7fb2f445b7056bb63634205113cc8 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 3 Sep 2016 12:01:50 -0400 Subject: [PATCH 294/324] Add string guild resolving (#587) --- src/client/ClientDataResolver.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index 04ff7aeb6..dd9620f3d 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -66,6 +66,11 @@ class ClientDataResolver { if (guild instanceof Guild) { return guild; } + + if (typeof guild === 'string') { + return this.client.guilds.get(guild); + } + return null; } From 513fdabd19c75327d3bc7262e0bb237bdc690b59 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 3 Sep 2016 17:58:47 +0100 Subject: [PATCH 295/324] Add GUILD_SYNC support (user accounts are fixed now) --- src/structures/Guild.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 458539ffd..5c2e98117 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -624,6 +624,13 @@ class Guild { get owner() { return this.members.get(this.ownerID); } + + sync() { + return this.client.ws.send({ + op: 12, + d: [this.id], + }); + } } module.exports = Guild; From a172fffd762b85f88caea5d5317238f978ca9ecd Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 3 Sep 2016 17:59:10 +0100 Subject: [PATCH 296/324] Actually add GUILD_SYNC --- src/client/Client.js | 7 +++++ src/client/ClientManager.js | 2 +- src/client/actions/ActionsManager.js | 1 + src/client/actions/GuildSync.js | 29 +++++++++++++++++++ src/client/websocket/WebSocketManager.js | 5 +++- .../packets/WebSocketPacketManager.js | 1 + .../websocket/packets/handlers/GuildSync.js | 14 +++++++++ .../websocket/packets/handlers/Ready.js | 6 ++++ src/structures/Guild.js | 9 +++--- src/util/Constants.js | 1 + 10 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 src/client/actions/GuildSync.js create mode 100644 src/client/websocket/packets/handlers/GuildSync.js diff --git a/src/client/Client.js b/src/client/Client.js index 579642d58..f07216d81 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -173,6 +173,13 @@ class Client extends EventEmitter { return timeout; } + syncGuilds(guilds = this.guilds.array()) { + return this.ws.send({ + op: 12, + d: guilds.map(g => g.id), + }); + } + /** * Caches a user, or obtains it from the cache if it's already cached. * If the user isn't already cached, it will only be obtainable by OAuth bot accounts. diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index 2cd6a3932..e214fc9f6 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -48,7 +48,7 @@ class ClientManager { this.client.ws.send({ op: Constants.OPCodes.HEARTBEAT, d: Date.now(), - }); + }, true); }, time); } diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index 378136598..bb07c00f8 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -20,6 +20,7 @@ class ActionsManager { this.register('GuildRoleUpdate'); this.register('UserGet'); this.register('UserUpdate'); + this.register('GuildSync'); } register(name) { diff --git a/src/client/actions/GuildSync.js b/src/client/actions/GuildSync.js new file mode 100644 index 000000000..a232df008 --- /dev/null +++ b/src/client/actions/GuildSync.js @@ -0,0 +1,29 @@ +const Action = require('./Action'); + +class GuildSync extends Action { + + handle(data) { + const client = this.client; + const guild = client.guilds.get(data.id); + + if (guild) { + data.presences = data.presences || []; + data.members = data.members || []; + for (const presence of data.presences) { + const user = client.users.get(presence.user.id); + if (user) { + user.status = presence.status; + user.game = presence.game; + } + } + for (const syncMember of data.members) { + const member = guild.members.get(syncMember.user.id); + if (member) { + guild._updateMember(member, syncMember); + } + } + } + } +} + +module.exports = GuildSync; diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index da53944d2..3f07901a1 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -71,7 +71,10 @@ class WebSocketManager { * @param {Object} packet An object that can be JSON stringified * @returns {void} */ - send(data) { + send(data, force = false) { + if (force) { + return this.ws.send(JSON.stringify(data)); + } this._queue.push(JSON.stringify(data)); this.doQueue(); } diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 88b0f5c0e..284024a77 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -40,6 +40,7 @@ class WebSocketPacketManager { this.register(Constants.WSEvents.VOICE_SERVER_UPDATE, 'VoiceServerUpdate'); this.register(Constants.WSEvents.MESSAGE_DELETE_BULK, 'MessageDeleteBulk'); this.register(Constants.WSEvents.CHANNEL_PINS_UPDATE, 'ChannelPinsUpdate'); + this.register(Constants.WSEvents.GUILD_SYNC, 'GuildSync'); } get client() { diff --git a/src/client/websocket/packets/handlers/GuildSync.js b/src/client/websocket/packets/handlers/GuildSync.js new file mode 100644 index 000000000..941ea9f15 --- /dev/null +++ b/src/client/websocket/packets/handlers/GuildSync.js @@ -0,0 +1,14 @@ +const AbstractHandler = require('./AbstractHandler'); + +class GuildSyncHandler extends AbstractHandler { + + handle(packet) { + const data = packet.d; + const client = this.packetManager.client; + + client.actions.GuildSync.handle(data); + } + +} + +module.exports = GuildSyncHandler; diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index 217127c77..3f430d71a 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -21,6 +21,12 @@ class ReadyHandler extends AbstractHandler { client.dataManager.newChannel(privateDM); } + if (!client.user.bot) { + client.setInterval(client.syncGuilds.bind(client), 30000); + } + + client.once('ready', client.syncGuilds.bind(client)); + this.packetManager.ws.sessionID = data.session_id; this.packetManager.ws.checkIfReady('abc'); diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 5c2e98117..45cb56cf2 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -625,11 +625,12 @@ class Guild { return this.members.get(this.ownerID); } + /** + * Syncs this guild (already done automatically every 30 seconds) + * @returns {void} + */ sync() { - return this.client.ws.send({ - op: 12, - d: [this.id], - }); + this.client.syncGuilds([this]); } } diff --git a/src/util/Constants.js b/src/util/Constants.js index 88d8d52a2..db3bb220b 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -201,6 +201,7 @@ exports.WSEvents = { VOICE_SERVER_UPDATE: 'VOICE_SERVER_UPDATE', MESSAGE_DELETE_BULK: 'MESSAGE_DELETE_BULK', CHANNEL_PINS_UPDATE: 'CHANNEL_PINS_UPDATE', + GUILD_SYNC: 'GUILD_SYNC', }; const PermissionFlags = exports.PermissionFlags = { From 2682c07bd8d37cde55570855dfac0b46bc3ff10a Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 3 Sep 2016 14:32:04 -0400 Subject: [PATCH 297/324] Add dev dependencies and cleanup ESLint file (#588) --- .eslintrc.js | 20 -------------------- .eslintrc.json | 20 ++++++++++++++++++++ package.json | 7 ++++++- 3 files changed, 26 insertions(+), 21 deletions(-) delete mode 100644 .eslintrc.js create mode 100644 .eslintrc.json diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index e67102ed4..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - "extends": "airbnb", - "plugins": [ - "react", - "jsx-a11y", - "import" - ], - "rules" : { - "max-len": [2, 120, 2], - "no-underscore-dangle": 0, - "global-require": 0, - "guard-for-in": 0, - "no-restricted-syntax": 0, - "no-param-reassign": 0, - "consistent-return": 0, - "import/no-extraneous-dependencies": 0, - "no-continue": 0, - "no-confusing-arrow" : 0 - } -}; \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000000000..4312e2c44 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,20 @@ +{ + "extends": "airbnb", + "plugins": [ + "import", + "react", + "jsx-a11y" + ], + "rules": { + "max-len": [2, 120, 2], + "no-underscore-dangle": 0, + "global-require": 0, + "guard-for-in": 0, + "no-restricted-syntax": 0, + "no-param-reassign": 0, + "consistent-return": 0, + "import/no-extraneous-dependencies": 0, + "no-continue": 0, + "no-confusing-arrow" : 0 + } +} diff --git a/package.json b/package.json index f974f5b2a..3f1c7148e 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,12 @@ }, "devDependencies": { "fs-extra": "^0.30.0", - "jsdoc-parse": "^1.2.7" + "jsdoc-parse": "^1.2.0", + "eslint": "^3.4.0", + "eslint-config-airbnb": "^10.0.0", + "eslint-plugin-import": "^1.14.0", + "eslint-plugin-react": "^6.2.0", + "eslint-plugin-jsx-a11y": "^2.2.0" }, "optionalDependencies": { "node-opus": "^0.1.13" From 68acf37fd4f85e198799744b7aeaf3e13d86a174 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 3 Sep 2016 15:45:23 -0400 Subject: [PATCH 298/324] Add stricter/better ESLint config (#589) * Add stricter/better ESLint config * Remove more unnecessary @returns --- .eslintrc.json | 145 ++++++++++++++++-- .travis.yml | 3 +- package.json | 6 +- src/client/Client.js | 12 +- src/client/ClientDataResolver.js | 28 ++-- src/client/ClientManager.js | 2 - src/client/rest/RESTMethods.js | 4 +- .../rest/RequestHandlers/RequestHandler.js | 2 +- src/client/voice/ClientVoiceManager.js | 8 +- src/client/voice/VoiceConnection.js | 17 +- src/client/voice/VoiceConnectionUDPClient.js | 5 +- src/client/voice/VoiceConnectionWebSocket.js | 13 +- .../voice/dispatcher/StreamDispatcher.js | 38 ++--- src/client/voice/opus/OpusEngineList.js | 2 +- src/client/voice/pcm/FfmpegConverterEngine.js | 1 + src/client/voice/player/BasePlayer.js | 5 +- src/client/voice/receiver/VoiceReadable.js | 1 + src/client/voice/receiver/VoiceReceiver.js | 3 +- src/client/websocket/WebSocketManager.js | 32 ++-- .../packets/handlers/ChannelPinsUpdate.js | 2 +- .../packets/handlers/PresenceUpdate.js | 6 +- .../websocket/packets/handlers/Ready.js | 2 +- src/structures/Channel.js | 2 +- src/structures/EvaluatedPermissions.js | 2 +- src/structures/GroupDMChannel.js | 6 +- src/structures/Guild.js | 44 +++--- src/structures/GuildChannel.js | 26 ++-- src/structures/Message.js | 2 +- src/structures/Role.js | 4 +- src/structures/User.js | 8 +- src/structures/VoiceChannel.js | 1 - src/structures/interface/TextBasedChannel.js | 6 +- src/util/Collection.js | 2 +- 33 files changed, 266 insertions(+), 174 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 4312e2c44..b0f5c06b8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,20 +1,133 @@ { - "extends": "airbnb", - "plugins": [ - "import", - "react", - "jsx-a11y" - ], + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 6 + }, + "env": { + "es6": true, + "node": true + }, "rules": { - "max-len": [2, 120, 2], - "no-underscore-dangle": 0, - "global-require": 0, - "guard-for-in": 0, - "no-restricted-syntax": 0, - "no-param-reassign": 0, - "consistent-return": 0, - "import/no-extraneous-dependencies": 0, - "no-continue": 0, - "no-confusing-arrow" : 0 + "no-extra-parens": ["warn", "all", { + "nestedBinaryExpressions": false + }], + "valid-jsdoc": ["error", { + "requireReturn": false, + "requireReturnDescription": false, + "preferType": { + "String": "string", + "Number": "number", + "Boolean": "boolean", + "Function": "function", + "object": "Object", + "date": "Date", + "error": "Error" + }, + "prefer": { + "return": "returns" + } + }], + + "accessor-pairs": "warn", + "array-callback-return": "error", + "complexity": "warn", + "consistent-return": "error", + "curly": ["error", "multi-line", "consistent"], + "dot-location": ["error", "property"], + "dot-notation": "error", + "eqeqeq": "error", + "no-empty-function": "error", + "no-floating-decimal": "error", + "no-implied-eval": "error", + "no-invalid-this": "error", + "no-lone-blocks": "error", + "no-multi-spaces": "error", + "no-new-func": "error", + "no-new-wrappers": "error", + "no-new": "error", + "no-octal-escape": "error", + "no-return-assign": "error", + "no-self-compare": "error", + "no-sequences": "error", + "no-throw-literal": "error", + "no-unmodified-loop-condition": "error", + "no-unused-expressions": "error", + "no-useless-call": "error", + "no-useless-concat": "error", + "no-useless-escape": "error", + "no-void": "error", + "no-warning-comments": "warn", + "wrap-iife": "error", + "yoda": "error", + + "no-label-var": "error", + "no-shadow": "error", + "no-undef-init": "error", + + "callback-return": "error", + "handle-callback-err": "error", + "no-mixed-requires": "error", + "no-new-require": "error", + "no-path-concat": "error", + "no-process-env": "error", + + "array-bracket-spacing": "error", + "block-spacing": "error", + "brace-style": ["error", "1tbs", { "allowSingleLine": true }], + "comma-dangle": ["error", "always-multiline"], + "comma-spacing": "error", + "comma-style": "error", + "computed-property-spacing": "error", + "consistent-this": ["error", "$this"], + "eol-last": "error", + "func-names": "error", + "func-style": ["error", "declaration", { "allowArrowFunctions": true }], + "indent": ["error", 2, { "SwitchCase": 1 }], + "key-spacing": "error", + "keyword-spacing": "error", + "max-depth": "error", + "max-len": ["error", 120, 2], + "max-nested-callbacks": ["error", { "max": 4 }], + "max-statements-per-line": ["error", { "max": 2 }], + "new-cap": "error", + "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 3 }], + "no-array-constructor": "error", + "no-inline-comments": "error", + "no-lonely-if": "error", + "no-mixed-operators": "error", + "no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }], + "no-new-object": "error", + "no-spaced-func": "error", + "no-trailing-spaces": "error", + "no-unneeded-ternary": "error", + "no-whitespace-before-property": "error", + "object-curly-spacing": ["error", "always"], + "operator-assignment": "error", + "operator-linebreak": ["error", "after"], + "padded-blocks": ["error", "never"], + "quote-props": ["error", "as-needed"], + "quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }], + "semi-spacing": "error", + "semi": "error", + "space-before-blocks": "error", + "space-before-function-paren": ["error", "never"], + "space-in-parens": "error", + "space-infix-ops": "error", + "space-unary-ops": "error", + "spaced-comment": "error", + "unicode-bom": "error", + + "arrow-body-style": "error", + "arrow-spacing": "error", + "no-duplicate-imports": "error", + "no-useless-computed-key": "error", + "no-useless-constructor": "error", + "prefer-arrow-callback": "error", + "prefer-rest-params": "error", + "prefer-spread": "error", + "prefer-template": "error", + "rest-spread-spacing": "error", + "template-curly-spacing": "error", + "yield-star-spacing": "error" } } diff --git a/.travis.yml b/.travis.yml index d88f78fa5..82e77e0af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,5 +4,4 @@ node_js: cache: directories: - node_modules -before_install: npm install -g eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react -install: npm install \ No newline at end of file +install: npm install diff --git a/package.json b/package.json index 3f1c7148e..aabb09cd0 100644 --- a/package.json +++ b/package.json @@ -34,11 +34,7 @@ "devDependencies": { "fs-extra": "^0.30.0", "jsdoc-parse": "^1.2.0", - "eslint": "^3.4.0", - "eslint-config-airbnb": "^10.0.0", - "eslint-plugin-import": "^1.14.0", - "eslint-plugin-react": "^6.2.0", - "eslint-plugin-jsx-a11y": "^2.2.0" + "eslint": "^3.4.0" }, "optionalDependencies": { "node-opus": "^0.1.13" diff --git a/src/client/Client.js b/src/client/Client.js index f07216d81..3aafa8665 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -117,7 +117,7 @@ class Client extends EventEmitter { * @param {string} emailOrToken The email or token used for the account. If it is an email, a password _must_ be * provided. * @param {string} [password] The password for the account, only needed if an email was provided. - * @return {Promise} + * @returns {Promise} * @example * // log the client in using a token * const token = 'my token'; @@ -128,13 +128,13 @@ class Client extends EventEmitter { * const password = 'supersecret123'; * client.login(email, password); */ - login(email, password) { + login(emailOrToken, password) { if (password) { // login with email and password - return this.rest.methods.loginEmailPassword(email, password); + return this.rest.methods.loginEmailPassword(emailOrToken, password); } // login with token - return this.rest.methods.loginToken(email); + return this.rest.methods.loginToken(emailOrToken); } /** @@ -174,7 +174,7 @@ class Client extends EventEmitter { } syncGuilds(guilds = this.guilds.array()) { - return this.ws.send({ + this.ws.send({ op: 12, d: guilds.map(g => g.id), }); @@ -184,7 +184,7 @@ class Client extends EventEmitter { * Caches a user, or obtains it from the cache if it's already cached. * If the user isn't already cached, it will only be obtainable by OAuth bot accounts. * @param {string} id The ID of the user to obtain - * @return {Promise} + * @returns {Promise} */ fetchUser(id) { if (this.users.has(id)) return Promise.resolve(this.users.get(id)); diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index dd9620f3d..cf8d77b25 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -20,6 +20,7 @@ class ClientDataResolver { constructor(client) { this.client = client; } + /** * Data that resolves to give a User object. This can be: * * A User object @@ -80,15 +81,14 @@ class ClientDataResolver { * * A User object * @typedef {Guild} GuildMemberResolvable */ + /** * Resolves a GuildMemberResolvable to a GuildMember object * @param {GuildResolvable} guild the guild that the member is part of * @param {UserResolvable} user the user that is part of the guild * @returns {?GuildMember} */ - resolveGuildMember($guild, $user) { - let guild = $guild; - let user = $user; + resolveGuildMember(guild, user) { if (user instanceof GuildMember) { return user; } @@ -112,7 +112,7 @@ class ClientDataResolver { /** * Resolves a Base64Resolvable to a Base 64 image - * @param {Base64Resolvable} dataResolvable the base 64 resolvable you want to resolve + * @param {Base64Resolvable} data the base 64 resolvable you want to resolve * @returns {?string} */ resolveBase64(data) { @@ -132,7 +132,7 @@ class ClientDataResolver { /** * Resolves a ChannelResolvable to a Channel object - * @param {ChannelResolvable} channelResolvable the channel resolvable to resolve + * @param {ChannelResolvable} channel the channel resolvable to resolve * @returns {?Channel} */ resolveChannel(channel) { @@ -157,7 +157,7 @@ class ClientDataResolver { /** * Resolves a StringResolvable to a string - * @param {StringResolvable} StringResolvable the string resolvable to resolve + * @param {StringResolvable} data the string resolvable to resolve * @returns {string} */ resolveString(data) { @@ -176,13 +176,13 @@ class ClientDataResolver { * Data that can be resolved to give a Buffer. This can be: * * A Buffer * * The path to a local file - * * An URL + * * A URL * @typedef {string|Buffer} FileResolvable */ /** * Resolves a FileResolvable to a Buffer - * @param {FileResolvable} fileResolvable the file resolvable to resolve + * @param {FileResolvable} resource the file resolvable to resolve * @returns {string|Buffer} */ resolveFile(resource) { @@ -190,20 +190,18 @@ class ClientDataResolver { return new Promise((resolve, reject) => { if (/^https?:\/\//.test(resource)) { request.get(resource) - .set('Content-Type', 'blob') - .end((err, res) => err ? reject(err) : resolve(res.body)); + .set('Content-Type', 'blob') + .end((err, res) => err ? reject(err) : resolve(res.body)); } else { const file = path.resolve(resource); const stat = fs.statSync(file); if (!stat.isFile()) { - return reject(new Error(`The file could not be found: ${file}`)); + reject(new Error(`The file could not be found: ${file}`)); + return; } fs.readFile(file, (err, data) => { - if (err) { - return reject(err); - } - resolve(data); + if (err) reject(err); else resolve(data); }); } }); diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index e214fc9f6..7b1f411ad 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -24,7 +24,6 @@ class ClientManager { * @param {string} token the authorization token * @param {function} resolve function to run when connection is successful * @param {function} reject function to run when connection fails - * @returns {void} */ connectToWebSocket(token, resolve, reject) { this.client.token = token; @@ -41,7 +40,6 @@ class ClientManager { /** * Sets up a keep-alive interval to keep the Client's connection valid * @param {number} time the interval in milliseconds at which heartbeat packets should be sent - * @returns {void} */ setupKeepAlive(time) { this.heartbeatInterval = this.client.setInterval(() => { diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 68736fc12..e63c1fb75 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -417,9 +417,7 @@ class RESTMethods { } }; this.rest.client.on(Constants.Events.GUILD_BAN_REMOVE, listener); - this.rest.makeRequest('del', `${Constants.Endpoints.guildBans(guild.id)}/${member.id}`, true) - .then(() => {}) - .catch(reject); + this.rest.makeRequest('del', `${Constants.Endpoints.guildBans(guild.id)}/${member.id}`, true).catch(reject); }); } diff --git a/src/client/rest/RequestHandlers/RequestHandler.js b/src/client/rest/RequestHandlers/RequestHandler.js index 561c0f155..0a7d3e53f 100644 --- a/src/client/rest/RequestHandlers/RequestHandler.js +++ b/src/client/rest/RequestHandlers/RequestHandler.js @@ -41,7 +41,7 @@ class RequestHandler { * Attempts to get this RequestHandler to process its current queue */ handle() { - + return; } } diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index d04777c08..41ebf94de 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -99,12 +99,13 @@ class ClientVoiceManager { /** * Sets up a request to join a voice channel * @param {VoiceChannel} channel the voice channel to join - * @returns {void} + * @returns {Promise} */ joinChannel(channel) { return new Promise((resolve, reject) => { if (this.pending.get(channel.guild.id)) { - return reject(new Error('already connecting to a channel in this guild')); + reject(new Error('already connecting to a channel in this guild')); + return; } const existingConn = this.connections.get(channel.guild.id); if (existingConn) { @@ -112,7 +113,8 @@ class ClientVoiceManager { this._sendWSJoin(channel); this.connections.get(channel.guild.id).channel = channel; } - return resolve(existingConn); + resolve(existingConn); + return; } this.pending.set(channel.guild.id, { channel, diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index f5416c7ed..7e7442c52 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -65,24 +65,22 @@ class VoiceConnection extends EventEmitter { /** * Executed whenever an error occurs with the UDP/WebSocket sub-client * @private - * @param {Error} error - * @returns {void} + * @param {Error} err The error that occurred */ - _onError(e) { - this._reject(e); + _onError(err) { + this._reject(err); /** * Emitted whenever the connection encounters a fatal error. * @event VoiceConnection#error * @param {Error} error the encountered error */ - this.emit('error', e); - this._shutdown(e); + this.emit('error', err); + this._shutdown(err); } /** * Disconnects the Client from the Voice Channel * @param {string} [reason='user requested'] the reason of the disconnection - * @returns {void} */ disconnect(reason = 'user requested') { this.manager.client.ws.send({ @@ -94,7 +92,7 @@ class VoiceConnection extends EventEmitter { self_deaf: false, }, }); - return this._shutdown(reason); + this._shutdown(reason); } _onClose(e) { @@ -122,7 +120,6 @@ class VoiceConnection extends EventEmitter { /** * Binds listeners to the WebSocket and UDP sub-clients - * @returns {void} * @private */ bindListeners() { @@ -208,7 +205,7 @@ class VoiceConnection extends EventEmitter { /** * Play the given file in the voice connection - * @param {string} filepath the path to the file + * @param {string} file the path to the file * @returns {StreamDispatcher} * @example * // play files natively diff --git a/src/client/voice/VoiceConnectionUDPClient.js b/src/client/voice/VoiceConnectionUDPClient.js index 6ccf63a08..7bd058a02 100644 --- a/src/client/voice/VoiceConnectionUDPClient.js +++ b/src/client/voice/VoiceConnectionUDPClient.js @@ -16,7 +16,8 @@ class VoiceConnectionUDPClient extends EventEmitter { dnsLookup() { dns.lookup(this.voiceConnection.endpoint, (err, address) => { if (err) { - return this.emit('error', err); + this.emit('error', err); + return; } this.connectUDP(address); }); @@ -27,7 +28,7 @@ class VoiceConnectionUDPClient extends EventEmitter { try { this.udpSocket.send(packet, 0, packet.length, this.data.port, this.udpIP); } catch (err) { - return this.emit('error', err); + this.emit('error', err); } } } diff --git a/src/client/voice/VoiceConnectionWebSocket.js b/src/client/voice/VoiceConnectionWebSocket.js index 44590d2f8..6e47b1bfc 100644 --- a/src/client/voice/VoiceConnectionWebSocket.js +++ b/src/client/voice/VoiceConnectionWebSocket.js @@ -51,16 +51,18 @@ class VoiceConnectionWebSocket extends EventEmitter { }); } - _onClose(e) { + _onClose(err) { if (!this.opened && this.attempts >= 0) { - return this.setupWS(); + this.setupWS(); + return; } - this.emit('close', e); + this.emit('close', err); } _onError(e) { if (!this.opened && this.attempts >= 0) { - return this.setupWS(); + this.setupWS(); + return; } this.emit('error', e); } @@ -83,7 +85,8 @@ class VoiceConnectionWebSocket extends EventEmitter { try { packet = JSON.parse(event.data); } catch (error) { - return this._onError(error); + this._onError(error); + return; } switch (packet.op) { diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 86deab35b..98ce19cd9 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -62,15 +62,18 @@ class StreamDispatcher extends EventEmitter { _send() { try { if (this._triggered) { - return this._setSpeaking(false); + this._setSpeaking(false); + return; } const data = this.streamingData; if (data.missed >= 5) { - return this._triggerTerminalState('error', new Error('stream is not generating fast enough')); + this._triggerTerminalState('error', new Error('stream is not generating fast enough')); + return; } if (this.paused) { - data.timestamp = (data.timestamp + 4294967295) ? data.timestamp + 960 : 0; - return this.player.connection.manager.client.setTimeout(() => this._send(), data.length * 10); + data.timestamp = data.timestamp + 4294967295 ? data.timestamp + 960 : 0; + this.player.connection.manager.client.setTimeout(() => this._send(), data.length * 10); + return; } const bufferLength = 1920 * data.channels; this._setSpeaking(true); @@ -78,7 +81,8 @@ class StreamDispatcher extends EventEmitter { if (!buffer) { data.missed++; - return this.player.connection.manager.client.setTimeout(() => this._send(), data.length * 10); + this.player.connection.manager.client.setTimeout(() => this._send(), data.length * 10); + return; } data.missed = 0; @@ -91,7 +95,7 @@ class StreamDispatcher extends EventEmitter { data.count++; data.sequence = (data.sequence + 1) < (65536) ? data.sequence + 1 : 0; - data.timestamp = (data.timestamp + 4294967295) ? data.timestamp + 960 : 0; + data.timestamp = data.timestamp + 4294967295 ? data.timestamp + 960 : 0; this._sendBuffer(buffer, data.sequence, data.timestamp); @@ -114,14 +118,14 @@ class StreamDispatcher extends EventEmitter { /** * Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`. * @event StreamDispatcher#error - * @param {Error} error the error encountered + * @param {Error} err the error encountered */ - _triggerError(e) { + _triggerError(err) { this.emit('end'); - this.emit('error', e); + this.emit('error', err); } - _triggerTerminalState(state, e) { + _triggerTerminalState(state, err) { if (this._triggered) { return; } @@ -136,10 +140,10 @@ class StreamDispatcher extends EventEmitter { this._setSpeaking(false); switch (state) { case 'end': - this._triggerEnd(e); + this._triggerEnd(err); break; case 'error': - this._triggerError(e); + this._triggerError(err); break; default: this.emit('error', 'unknown trigger state'); @@ -149,10 +153,11 @@ class StreamDispatcher extends EventEmitter { _startStreaming() { if (!this.stream) { - return this.emit('error', 'no stream'); + this.emit('error', 'no stream'); + return; } - this.stream.on('end', e => this._triggerTerminalState('end', e)); - this.stream.on('error', e => this._triggerTerminalState('error', e)); + this.stream.on('end', err => this._triggerTerminalState('end', err)); + this.stream.on('error', err => this._triggerTerminalState('error', err)); const data = this.streamingData; data.length = 20; data.missed = 0; @@ -172,7 +177,6 @@ class StreamDispatcher extends EventEmitter { /** * Stops the current stream permanently and emits an `end` event. - * @returns {void} */ end() { this._triggerTerminalState('end', 'user requested'); @@ -180,7 +184,6 @@ class StreamDispatcher extends EventEmitter { /** * Stops sending voice packets to the voice connection (stream may still progress however) - * @returns {void} */ pause() { this._pause(true); @@ -188,7 +191,6 @@ class StreamDispatcher extends EventEmitter { /** * Resumes sending voice packets to the voice connection (may be further on in the stream than when paused) - * @returns {void} */ resume() { this._pause(false); diff --git a/src/client/voice/opus/OpusEngineList.js b/src/client/voice/opus/OpusEngineList.js index fb4b9855b..89b9aa07a 100644 --- a/src/client/voice/opus/OpusEngineList.js +++ b/src/client/voice/opus/OpusEngineList.js @@ -11,7 +11,7 @@ function fetch(Encoder) { try { return new Encoder(); } catch (err) { - return; + return null; } } diff --git a/src/client/voice/pcm/FfmpegConverterEngine.js b/src/client/voice/pcm/FfmpegConverterEngine.js index f5b44a799..b5dd7e389 100644 --- a/src/client/voice/pcm/FfmpegConverterEngine.js +++ b/src/client/voice/pcm/FfmpegConverterEngine.js @@ -7,6 +7,7 @@ function chooseCommand() { return cmd; } } + return null; } class FfmpegConverterEngine extends ConverterEngine { diff --git a/src/client/voice/player/BasePlayer.js b/src/client/voice/player/BasePlayer.js index d8f5ff5a2..aa0a35dca 100644 --- a/src/client/voice/player/BasePlayer.js +++ b/src/client/voice/player/BasePlayer.js @@ -70,11 +70,12 @@ class VoiceConnectionPlayer extends EventEmitter { streams.inputStream.destroy(); this.emit('debug', 'stream kill part 5/5 pass'); } - } catch (e) { - return e; + } catch (err) { + return err; } } } + return null; } setSpeaking(value) { diff --git a/src/client/voice/receiver/VoiceReadable.js b/src/client/voice/receiver/VoiceReadable.js index c5bb7e04e..f68b7f458 100644 --- a/src/client/voice/receiver/VoiceReadable.js +++ b/src/client/voice/receiver/VoiceReadable.js @@ -8,6 +8,7 @@ class VoiceReadable extends Readable { } _read() { + return; } $push(d) { diff --git a/src/client/voice/receiver/VoiceReceiver.js b/src/client/voice/receiver/VoiceReceiver.js index 00563d79b..042da4f42 100644 --- a/src/client/voice/receiver/VoiceReceiver.js +++ b/src/client/voice/receiver/VoiceReceiver.js @@ -91,7 +91,8 @@ class VoiceReceiver extends EventEmitter { * @event VoiceReceiver#warn * @param {string} message the warning message */ - return this.emit('warn', 'failed to decrypt voice packet'); + this.emit('warn', 'failed to decrypt voice packet'); + return; } data = new Buffer(data); /** diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 3f07901a1..8f5240c89 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -49,7 +49,6 @@ class WebSocketManager { /** * Connects the client to a given gateway * @param {string} gateway the gateway to connect to - * @returns {void} */ connect(gateway) { this.status = Constants.Status.CONNECTING; @@ -68,12 +67,13 @@ class WebSocketManager { /** * Sends a packet to the gateway - * @param {Object} packet An object that can be JSON stringified - * @returns {void} + * @param {Object} data An object that can be JSON stringified + * @param {boolean} force Whether or not to send the packet immediately */ send(data, force = false) { if (force) { - return this.ws.send(JSON.stringify(data)); + this.ws.send(JSON.stringify(data)); + return; } this._queue.push(JSON.stringify(data)); this.doQueue(); @@ -89,9 +89,10 @@ class WebSocketManager { const item = this._queue[0]; if (this.ws.readyState === WebSocket.OPEN && item) { if (this._remaining === 0) { - return this.client.setTimeout(() => { + this.client.setTimeout(() => { this.doQueue(); }, 1000); + return; } this._remaining--; this.ws.send(item); @@ -103,7 +104,6 @@ class WebSocketManager { /** * Run whenever the gateway connections opens up - * @returns {void} */ eventOpen() { if (this.reconnecting) { @@ -115,7 +115,6 @@ class WebSocketManager { /** * Sends a gatway resume packet, in cases of unexpected disconnections. - * @returns {void} */ _sendResume() { const payload = { @@ -132,7 +131,6 @@ class WebSocketManager { /** * Sends a new identification packet, in cases of new connections or failed reconnections. - * @returns {void} */ _sendNewIdentify() { this.reconnecting = false; @@ -150,7 +148,7 @@ class WebSocketManager { /** * Run whenever the connection to the gateway is closed, it will try to reconnect the client. - * @returns {void} + * @param {Object} event the event */ eventClose(event) { if (event.code === 4004) { @@ -164,12 +162,11 @@ class WebSocketManager { /** * Run whenever a message is received from the WebSocket. Returns `true` if the message * was handled properly. - * @param {Object} data the received websocket data + * @param {Object} event the received websocket data * @returns {boolean} */ - eventMessage($event) { + eventMessage(event) { let packet; - const event = $event; try { if (event.binary) { event.data = zlib.inflateSync(event.data).toString(); @@ -191,15 +188,15 @@ class WebSocketManager { /** * Run whenever an error occurs with the WebSocket connection. Tries to reconnect - * @returns {void} + * @param {Error} err the error that occurred */ - eventError(e) { + eventError(err) { /** * Emitted whenever the Client encounters a serious connection error * @event Client#error * @param {Error} error the encountered error */ - this.client.emit('error', e); + this.client.emit('error', err); this.tryReconnect(); } @@ -217,7 +214,6 @@ class WebSocketManager { /** * Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares * the `READY` event. - * @returns {void} */ checkIfReady() { if (this.status !== Constants.Status.READY && this.status !== Constants.Status.NEARLY) { @@ -229,10 +225,11 @@ class WebSocketManager { this.status = Constants.Status.NEARLY; if (this.client.options.fetch_all_members) { const promises = this.client.guilds.array().map(g => g.fetchMembers()); - return Promise.all(promises).then(() => this._emitReady()).catch(e => { + Promise.all(promises).then(() => this._emitReady()).catch(e => { this.client.emit('warn', `error on pre-ready guild member fetching - ${e}`); this._emitReady(); }); + return; } this._emitReady(); } @@ -241,7 +238,6 @@ class WebSocketManager { /** * Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING. - * @returns {void} */ tryReconnect() { this.status = Constants.Status.RECONNECTING; diff --git a/src/client/websocket/packets/handlers/ChannelPinsUpdate.js b/src/client/websocket/packets/handlers/ChannelPinsUpdate.js index 1604ed1b2..c597a04fa 100644 --- a/src/client/websocket/packets/handlers/ChannelPinsUpdate.js +++ b/src/client/websocket/packets/handlers/ChannelPinsUpdate.js @@ -20,7 +20,7 @@ class ChannelPinsUpdate extends AbstractHandler { const time = new Date(data.last_pin_timestamp); if (channel && time) { - return client.emit(Constants.Events.CHANNEL_PINS_UPDATE, channel, time); + client.emit(Constants.Events.CHANNEL_PINS_UPDATE, channel, time); } } diff --git a/src/client/websocket/packets/handlers/PresenceUpdate.js b/src/client/websocket/packets/handlers/PresenceUpdate.js index a9ce16ca0..98b22e2d0 100644 --- a/src/client/websocket/packets/handlers/PresenceUpdate.js +++ b/src/client/websocket/packets/handlers/PresenceUpdate.js @@ -45,14 +45,12 @@ class PresenceUpdateHandler extends AbstractHandler { data.user.status = data.status || user.status; data.user.game = data.game; - const same = ( - data.user.username === user.username && + const same = data.user.username === user.username && data.user.id === user.id && data.user.discriminator === user.discriminator && data.user.avatar === user.avatar && data.user.status === user.status && - JSON.stringify(data.user.game) === JSON.stringify(user.game) - ); + JSON.stringify(data.user.game) === JSON.stringify(user.game); if (!same) { const oldUser = cloneObject(user); diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index 3f430d71a..f48c93d02 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -29,7 +29,7 @@ class ReadyHandler extends AbstractHandler { this.packetManager.ws.sessionID = data.session_id; - this.packetManager.ws.checkIfReady('abc'); + this.packetManager.ws.checkIfReady(); } } diff --git a/src/structures/Channel.js b/src/structures/Channel.js index 69cff3871..0a9113696 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -37,7 +37,7 @@ class Channel { /** * Deletes the channel - * @return {Promise} + * @returns {Promise} * @example * // delete the channel * channel.delete() diff --git a/src/structures/EvaluatedPermissions.js b/src/structures/EvaluatedPermissions.js index bcb9ac385..511972baf 100644 --- a/src/structures/EvaluatedPermissions.js +++ b/src/structures/EvaluatedPermissions.js @@ -53,7 +53,7 @@ class EvaluatedPermissions { } } - return ((this.permissions & permission) > 0); + return (this.permissions & permission) > 0; } } diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index f7be352bc..e663fff8e 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -54,13 +54,11 @@ class GroupDMChannel extends Channel { } equals(other) { - const base = ( - other && + const base = other && this.id === other.id && this.name === other.name && this.icon === other.icon && - this.owner.id === other.owner_id - ); + this.owner.id === other.owner_id; if (base) { const thisIDs = this.recipients.array().map(r => r.id); diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 45cb56cf2..615d5203e 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -123,10 +123,7 @@ class Guild { member.nickname = data.nick; } - const notSame = ( - member.nickname !== oldMember.nickname && - !arraysEqual(member._roles, oldMember._roles) - ); + const notSame = member.nickname !== oldMember.nickname && !arraysEqual(member._roles, oldMember._roles); if (this.client.ws.status === Constants.Status.READY && notSame) { /** @@ -183,28 +180,28 @@ class Guild { * @param {Guild} guild the guild to compare * @returns {boolean} */ - equals(data) { + equals(guild) { let base = - data && - this.id === data.id && - this.available === !data.unavailable && - this.splash === data.splash && - this.region === data.region && - this.name === data.name && - this.memberCount === data.member_count && - this.large === data.large && - this.icon === data.icon && - arraysEqual(this.features, data.features) && - this.ownerID === data.owner_id && - this.verificationLevel === data.verification_level && - this.embedEnabled === data.embed_enabled; + guild && + this.id === guild.id && + this.available === !guild.unavailable && + this.splash === guild.splash && + this.region === guild.region && + this.name === guild.name && + this.memberCount === guild.member_count && + this.large === guild.large && + this.icon === guild.icon && + arraysEqual(this.features, guild.features) && + this.ownerID === guild.owner_id && + this.verificationLevel === guild.verification_level && + this.embedEnabled === guild.embed_enabled; if (base) { if (this.embedChannel) { - if (this.embedChannel.id !== data.embed_channel_id) { + if (this.embedChannel.id !== guild.embed_channel_id) { base = false; } - } else if (data.embed_channel_id) { + } else if (guild.embed_channel_id) { base = false; } } @@ -228,8 +225,7 @@ class Guild { /** * Sets up the Guild - * @param {*} data - * @returns {void} + * @param {*} data the raw data of the guild * @private */ setup(data) { @@ -588,7 +584,8 @@ class Guild { throw new Error('already fetching guild members'); } if (this.memberCount === this.members.size) { - return resolve(this); + resolve(this); + return; } this._fetchWaiter = resolve; this.client.ws.send({ @@ -627,7 +624,6 @@ class Guild { /** * Syncs this guild (already done automatically every 30 seconds) - * @returns {void} */ sync() { this.client.syncGuilds([this]); diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index c10cade55..720b42807 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -65,20 +65,18 @@ class GuildChannel extends Channel { * @param {GuildChannel} channel the channel to compare this channel to * @returns {boolean} */ - equals(other) { - let base = ( - other && - this.type === other.type && - this.topic === other.topic && - this.position === other.position && - this.name === other.name && - this.id === other.id - ); + equals(channel) { + let base = channel && + this.type === channel.type && + this.topic === channel.topic && + this.position === channel.position && + this.name === channel.name && + this.id === channel.id; if (base) { - if (other.permission_overwrites) { + if (channel.permission_overwrites) { const thisIDSet = Array.from(this.permissionOverwrites.keys()); - const otherIDSet = other.permission_overwrites.map(overwrite => overwrite.id); + const otherIDSet = channel.permission_overwrites.map(overwrite => overwrite.id); if (arraysEqual(thisIDSet, otherIDSet)) { base = true; } else { @@ -168,7 +166,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 {PermissionOverwriteOptions} config the configuration for the update + * @param {PermissionOverwriteOptions} options the configuration for the update * @returns {Promise} * @example * // overwrite permissions for a message author @@ -205,11 +203,11 @@ class GuildChannel extends Channel { for (const perm in options) { if (options[perm] === true) { - payload.allow |= (Constants.PermissionFlags[perm] || 0); + payload.allow |= Constants.PermissionFlags[perm] || 0; payload.deny &= ~(Constants.PermissionFlags[perm] || 0); } else if (options[perm] === false) { payload.allow &= ~(Constants.PermissionFlags[perm] || 0); - payload.deny |= (Constants.PermissionFlags[perm] || 0); + payload.deny |= Constants.PermissionFlags[perm] || 0; } } diff --git a/src/structures/Message.js b/src/structures/Message.js index 24c7cd46f..a681c8b57 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -155,7 +155,7 @@ class Message { return new Date(this._editedTimestamp); } - patch(data) { + patch(data) { // eslint-disable-line complexity if (data.author) { this.author = this.client.users.get(data.author.id); if (this.guild) { diff --git a/src/structures/Role.js b/src/structures/Role.js index f8407e8b2..d33ef48d6 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -212,7 +212,7 @@ class Role { } } - return ((this.permissions & permission) > 0); + return (this.permissions & permission) > 0; } /** @@ -229,7 +229,7 @@ class Role { * @readonly */ get hexColor() { - let col = (this.color).toString(16); + let col = this.color.toString(16); while (col.length < 6) { col = `0${col}`; } diff --git a/src/structures/User.js b/src/structures/User.js index 34a09cb54..c1d3ee5e1 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -80,7 +80,7 @@ class User { /** * Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful. - * @return {Promise} + * @returns {Promise} */ deleteDM() { return this.client.rest.methods.deleteChannel(this); @@ -93,14 +93,12 @@ class User { * @returns {boolean} */ equals(user) { - let base = ( - user && + let base = user && this.username === user.username && this.id === user.id && this.discriminator === user.discriminator && this.avatar === user.avatar && - this.bot === Boolean(user.bot) - ); + this.bot === Boolean(user.bot); if (base) { if (user.status) { diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index 1511fdfad..b33d5dbd9 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -59,7 +59,6 @@ class VoiceChannel extends GuildChannel { /** * Leaves this voice channel - * @returns {void} * @example * // leave a voice channel * voiceChannel.leave(); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 755b0ef76..566c3d3df 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -55,7 +55,7 @@ class MessageCollector extends EventEmitter { * @type {boolean} */ this.ended = false; - this.listener = (message => this.verify(message)); + this.listener = message => this.verify(message); this.channel.client.on('message', this.listener); /** * A collection of collected messages, mapped by message ID. @@ -70,7 +70,7 @@ class MessageCollector extends EventEmitter { /** * Verifies a message against the filter and options * @private - * @param {Message} message + * @param {Message} message the message * @returns {boolean} */ verify(message) { @@ -258,7 +258,6 @@ class TextBasedChannel { /** * Starts a typing indicator in the channel. * @param {number} [count] The number of times startTyping should be considered to have been called - * @returns {void} * @example * // start typing in a channel * channel.startTyping(); @@ -284,7 +283,6 @@ class TextBasedChannel { * The indicator will only stop if this is called as many times as startTyping(). * It can take a few seconds for the Client User to stop typing. * @param {boolean} [force=false] whether or not to force the indicator to stop regardless of call count - * @returns {void} * @example * // stop typing in a channel * channel.stopTyping(); diff --git a/src/util/Collection.js b/src/util/Collection.js index b967659a3..2a0b1110e 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -47,7 +47,7 @@ class Collection extends Map { /** * If the items in this collection have a delete method (e.g. messages), invoke * the delete method. Returns an array of promises - * @return {Array} + * @returns {Array} */ deleteAll() { const returns = []; From 09dee3d46a7f21a3fa6d0fb4112a21dfd296f029 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 3 Sep 2016 21:10:05 +0100 Subject: [PATCH 299/324] Fix ready never firing for truly unavailable guilds --- src/client/websocket/WebSocketManager.js | 10 +++++++++- src/client/websocket/packets/handlers/Ready.js | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 8f5240c89..22e84da56 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -44,6 +44,12 @@ class WebSocketManager { * @type {?string} */ this.gateway = null; + + /** + * Whether READY was emitted normally (all packets received) or not + * @type {boolean} + */ + this.normalReady = false; } /** @@ -51,6 +57,7 @@ class WebSocketManager { * @param {string} gateway the gateway to connect to */ connect(gateway) { + this.normalReady = false; this.status = Constants.Status.CONNECTING; /** * The WebSocket connection to the gateway @@ -200,7 +207,7 @@ class WebSocketManager { this.tryReconnect(); } - _emitReady() { + _emitReady(normal = true) { /** * Emitted when the Client becomes ready to start working * @@ -209,6 +216,7 @@ class WebSocketManager { this.status = Constants.Status.READY; this.client.emit(Constants.Events.READY); this.packetManager.handleQueue(); + this.normalReady = normal; } /** diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index f48c93d02..1283d46b0 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -27,6 +27,12 @@ class ReadyHandler extends AbstractHandler { client.once('ready', client.syncGuilds.bind(client)); + client.setTimeout(() => { + if (!client.ws.normalReady) { + client.ws._emitReady(false); + } + }, 1200 * data.guilds.length); + this.packetManager.ws.sessionID = data.session_id; this.packetManager.ws.checkIfReady(); From 7ff2568cfce50d7494e557d9cbdbbf7d0e6159db Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 3 Sep 2016 21:21:10 +0100 Subject: [PATCH 300/324] Fix collectors and make guild sync add previously unknown members --- src/client/actions/GuildMemberRemove.js | 4 +++- src/client/actions/GuildSync.js | 2 ++ src/client/websocket/packets/WebSocketPacketManager.js | 2 ++ src/structures/interface/TextBasedChannel.js | 4 ---- test/random.js | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/client/actions/GuildMemberRemove.js b/src/client/actions/GuildMemberRemove.js index ab5290dc2..b7a01d3a4 100644 --- a/src/client/actions/GuildMemberRemove.js +++ b/src/client/actions/GuildMemberRemove.js @@ -17,7 +17,9 @@ class GuildMemberRemoveAction extends Action { guild.memberCount--; guild._removeMember(member); this.deleted[guild.id + data.user.id] = member; - client.emit(Constants.Events.GUILD_MEMBER_REMOVE, guild, member); + if (client.status === Constants.Status.READY) { + client.emit(Constants.Events.GUILD_MEMBER_REMOVE, guild, member); + } this.scheduleForDeletion(guild.id, data.user.id); } diff --git a/src/client/actions/GuildSync.js b/src/client/actions/GuildSync.js index a232df008..7d01000db 100644 --- a/src/client/actions/GuildSync.js +++ b/src/client/actions/GuildSync.js @@ -20,6 +20,8 @@ class GuildSync extends Action { const member = guild.members.get(syncMember.user.id); if (member) { guild._updateMember(member, syncMember); + } else { + guild._addMember(syncMember); } } } diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 284024a77..2aeb1d531 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -5,6 +5,8 @@ const BeforeReadyWhitelist = [ Constants.WSEvents.GUILD_CREATE, Constants.WSEvents.GUILD_DELETE, Constants.WSEvents.GUILD_MEMBERS_CHUNK, + Constants.WSEvents.GUILD_MEMBER_ADD, + Constants.WSEvents.GUILD_MEMBER_REMOVE, ]; class WebSocketPacketManager { diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 566c3d3df..e5d719a22 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -21,7 +21,6 @@ const EventEmitter = require('events').EventEmitter; * ```js * { * time: null, // time in milliseconds. If specified, the collector ends after this amount of time. - * allowSelf: false, // whether or not the filter should take messages from the logged in client. * max: null, // the maximum amount of messages to handle before ending. * } * ``` @@ -77,9 +76,6 @@ class MessageCollector extends EventEmitter { if (this.channel ? this.channel.id !== message.channel.id : false) { return false; } - if (message.author.id === this.channel.client.user.id && !this.options.allowSelf) { - return false; - } if (this.filter(message, this)) { this.collected.set(message.id, message); /** diff --git a/test/random.js b/test/random.js index 9364431db..8d58d3086 100644 --- a/test/random.js +++ b/test/random.js @@ -4,7 +4,7 @@ const Discord = require('../'); const request = require('superagent'); const fs = require('fs'); -const client = new Discord.Client({ fetch_all_members: true }); +const client = new Discord.Client({ fetch_all_members: false }); const { email, password, token } = require('./auth.json'); From 1be027079630e4aa6bc6cbf7750e909b39e023d2 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 3 Sep 2016 21:25:56 +0100 Subject: [PATCH 301/324] Fix documentation generator --- docs/docs.json | 2 +- docs/generator/types/DocumentedVarType.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index a95d39479..70ab4de71 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472831833736},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":182,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":192,"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":201,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":194,"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":204,"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":247,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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":135,"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":310,"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":318,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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":135,"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":310,"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":318,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":377,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":390,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":433,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":447,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":461,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":475,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":489,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":503,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":517,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":531,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":559,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":567,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":575,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":585,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"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":268,"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":273,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":278,"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":286,"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":291,"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":296,"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":301,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":362,"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":612,"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":624,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":104,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["Boolean",""]]]},"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":110,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["String",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["String",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":135,"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":310,"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":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":128,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":174,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":188,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":197,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":242,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":266,"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":295,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":337,"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":366,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":399,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":135,"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":310,"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":318,"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":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":58,"file":"ClientDataResolver.js","path":"src/client"}},{"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":76,"file":"ClientDataResolver.js","path":"src/client"}},{"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":105,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":125,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":174,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n allowSelf: false, // whether or not the filter should take messages from the logged in client.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":153,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":218,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":342,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472934361811},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":48,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":181,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":188,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":110,"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":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":133,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":98,"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":109,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":218,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":236,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":255,"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":25,"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":30,"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":35,"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":46,"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":72,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"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":191,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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```"}]}} \ No newline at end of file diff --git a/docs/generator/types/DocumentedVarType.js b/docs/generator/types/DocumentedVarType.js index d814ed4ca..209431daf 100644 --- a/docs/generator/types/DocumentedVarType.js +++ b/docs/generator/types/DocumentedVarType.js @@ -12,6 +12,9 @@ const regex = /([\w]+)([^\w]+)/; const regexG = /([\w]+)([^\w]+)/g; function splitVarName(str) { + if (str === '*') { + return ['*', '']; + } const matches = str.match(regexG); const output = []; if (matches) { From 44b34154e8db403f1b91d6cfe4f95129fc3e05df Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 3 Sep 2016 21:32:06 +0100 Subject: [PATCH 302/324] guarantee promise resolution for voice connections --- docs/docs.json | 2 +- src/client/voice/ClientVoiceManager.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 70ab4de71..c9cbbe099 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472934361811},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":48,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":181,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":188,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":110,"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":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":133,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":98,"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":109,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":218,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":236,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":255,"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":25,"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":30,"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":35,"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":46,"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":72,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"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":191,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472934731715},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":48,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":181,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":188,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":110,"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":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":133,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":98,"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":109,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":218,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":236,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":255,"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":25,"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":30,"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":35,"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":46,"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":72,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"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":191,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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```"}]}} \ No newline at end of file diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index 41ebf94de..82ba39824 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -125,6 +125,7 @@ class ClientVoiceManager { reject, }); this._sendWSJoin(channel); + this.client.setTimeout(() => reject(new Error('connection not established in 15s time period')), 15000); }); } } From 64d89b37489c6d3b08412accad055c9c69175c4b Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 3 Sep 2016 16:36:54 -0400 Subject: [PATCH 303/324] Replace a few rejections with throw (#590) --- src/client/ClientDataResolver.js | 3 +-- src/client/voice/ClientVoiceManager.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index cf8d77b25..6ba335e05 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -196,8 +196,7 @@ class ClientDataResolver { const file = path.resolve(resource); const stat = fs.statSync(file); if (!stat.isFile()) { - reject(new Error(`The file could not be found: ${file}`)); - return; + throw new Error(`The file could not be found: ${file}`); } fs.readFile(file, (err, data) => { diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index 82ba39824..3120c4e0a 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -104,8 +104,7 @@ class ClientVoiceManager { joinChannel(channel) { return new Promise((resolve, reject) => { if (this.pending.get(channel.guild.id)) { - reject(new Error('already connecting to a channel in this guild')); - return; + throw new Error('already connecting to a channel in this guild'); } const existingConn = this.connections.get(channel.guild.id); if (existingConn) { From 5d067d505c28b3ba1dab8cfa3bcbe31e2773d170 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 3 Sep 2016 21:51:00 +0100 Subject: [PATCH 304/324] Add avatar example --- docs/custom/avatar.js | 10 ++++++++++ docs/custom/examples/avatar.js | 30 ++++++++++++++++++++++++++++++ docs/docs.json | 2 +- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 docs/custom/avatar.js create mode 100644 docs/custom/examples/avatar.js diff --git a/docs/custom/avatar.js b/docs/custom/avatar.js new file mode 100644 index 000000000..b3a77ced7 --- /dev/null +++ b/docs/custom/avatar.js @@ -0,0 +1,10 @@ +const fs = require('fs'); + +module.exports = { + category: 'Examples', + name: 'Avatars', + data: +`\`\`\`js +${fs.readFileSync('./docs/custom/examples/avatar.js').toString('utf-8')} +\`\`\``, +}; diff --git a/docs/custom/examples/avatar.js b/docs/custom/examples/avatar.js new file mode 100644 index 000000000..796d942bd --- /dev/null +++ b/docs/custom/examples/avatar.js @@ -0,0 +1,30 @@ +/* + Send a user a link to their avatar +*/ + +// import the discord.js module +const Discord = require('discord.js'); + +// create an instance of a Discord Client, and call it bot +const bot = new Discord.Client(); + +// the token of your bot - https://discordapp.com/developers/applications/me +const token = 'your bot token here'; + +// the ready event is vital, it means that your bot will only start reacting to information +// from Discord _after_ ready is emitted. +bot.on('ready', () => { + console.log('I am ready!'); +}); + +// create an event listener for messages +bot.on('message', message => { + // if the message is "what is my avatar", + if (message.content === 'what is my avatar') { + // send the user's avatar URL + message.reply(message.author.avatarURL); + } +}); + +// log our bot in +bot.login(token); diff --git a/docs/docs.json b/docs/docs.json index c9cbbe099..8a49e46c4 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472934731715},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":48,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":181,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":188,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":110,"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":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":133,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":98,"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":109,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":218,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":236,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":255,"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":25,"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":30,"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":35,"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":46,"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":72,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"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":191,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472935865646},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":48,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":181,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":188,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":110,"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":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":133,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":98,"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":109,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":218,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":236,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":255,"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":25,"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":30,"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":35,"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":46,"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":72,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"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":191,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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```"}]}} \ No newline at end of file From b6abe7dbab0fd652d87a3a404d9715ed2b9ea758 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 3 Sep 2016 21:51:18 +0100 Subject: [PATCH 305/324] actually register avatar example --- docs/custom/index.js | 1 + docs/docs.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/custom/index.js b/docs/custom/index.js index a2203b2c2..a75b308e7 100644 --- a/docs/custom/index.js +++ b/docs/custom/index.js @@ -2,6 +2,7 @@ const files = [ require('./welcome'), require('./updating'), require('./ping_pong'), + require('./avatar'), ]; const categories = {}; diff --git a/docs/docs.json b/docs/docs.json index 8a49e46c4..477e9b7b7 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472935865646},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":48,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":181,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":188,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":110,"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":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":133,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":98,"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":109,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":218,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":236,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":255,"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":25,"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":30,"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":35,"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":46,"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":72,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"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":191,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472935884455},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":48,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":181,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":188,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":110,"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":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":133,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":98,"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":109,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":218,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":236,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":255,"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":25,"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":30,"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":35,"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":46,"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":72,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"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":191,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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 From 432c5ccc8259dc51e0f53addb336c37fb4c7337f Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 3 Sep 2016 22:27:38 +0100 Subject: [PATCH 306/324] Add volume modification to dispatcher --- docs/docs.json | 2 +- .../voice/dispatcher/StreamDispatcher.js | 56 +++++++++++++++++++ test/random.js | 4 +- 3 files changed, 60 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 477e9b7b7..95ede7570 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472935884455},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":48,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":181,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":188,"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":195,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":110,"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":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":133,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":98,"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":109,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":218,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":236,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":255,"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":25,"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":30,"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":35,"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":46,"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":72,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"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":191,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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":12,"date":1472938063512},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":48,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":204,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":221,"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":229,"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":237,"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":244,"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":251,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":213,"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":27,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":133,"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":141,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":156,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":98,"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":109,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":218,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":236,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":255,"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":25,"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":30,"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":35,"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":46,"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":72,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"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":191,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 98ce19cd9..8d1686569 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -21,6 +21,7 @@ class StreamDispatcher extends EventEmitter { }; this._startStreaming(); this._triggered = false; + this._volume = 1; } /** @@ -59,6 +60,26 @@ class StreamDispatcher extends EventEmitter { return packetBuffer; } + _applyVolume(buffer) { + if (this._volume === 1) { + return buffer; + } + + const out = new Buffer(buffer.length); + + for (let i = 0; i < buffer.length; i += 2) { + if (i >= buffer.length - 1) { + break; + } + + const uint = Math.min(32767, Math.max(-32767, Math.floor(this._volume * buffer.readInt16LE(i)))); + + out.writeInt16LE(uint, i); + } + + return out; + } + _send() { try { if (this._triggered) { @@ -93,6 +114,8 @@ class StreamDispatcher extends EventEmitter { buffer = newBuffer; } + buffer = this._applyVolume(buffer); + data.count++; data.sequence = (data.sequence + 1) < (65536) ? data.sequence + 1 : 0; data.timestamp = data.timestamp + 4294967295 ? data.timestamp + 960 : 0; @@ -182,6 +205,39 @@ class StreamDispatcher extends EventEmitter { this._triggerTerminalState('end', 'user requested'); } + /** + * The volume of the stream, relative to the stream's input volume + * @type {number} + * @readonly + */ + get volume() { + return this._volume; + } + + /** + * Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double. + * @param {number} volume the volume that you want to set + */ + setVolume(volume) { + this._volume = volume; + } + + /** + * Set the volume in decibels + * @param {number} db the decibels + */ + setVolumeDecibels(db) { + this._volume = Math.pow(10, db / 20); + } + + /** + * Set the volume so that a perceived value of 0.5 is half the perceived volume etc. + * @param {number} value the value for the volume + */ + setVolumeLogarithmic(value) { + this._volume = Math.pow(value, 1.660964); + } + /** * Stops sending voice packets to the voice connection (stream may still progress however) */ diff --git a/test/random.js b/test/random.js index 8d58d3086..88ebc486c 100644 --- a/test/random.js +++ b/test/random.js @@ -124,13 +124,15 @@ client.on('message', msg => { const ytdl = require('ytdl-core'); +let disp; + client.on('message', msg => { if (msg.content.startsWith('/join')) { const chan = msg.content.split(' ').slice(1).join(' '); msg.channel.guild.channels.get(chan).join() .then(conn => { msg.reply('done'); - const disp = conn.player.playStream(ytdl('https://www.youtube.com/watch?v=nbXgHAzUWB0', {filter : 'audioonly'})); + disp = conn.player.playStream(ytdl('https://www.youtube.com/watch?v=nbXgHAzUWB0', {filter : 'audioonly'})); conn.player.on('debug', console.log); conn.player.on('error', err => console.log(123, err)); const receiver = conn.createReceiver(); From 59a5862f2d2622059922dab216d7768dc54436a9 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 3 Sep 2016 17:48:51 -0400 Subject: [PATCH 307/324] Clean up Actions code (#591) --- src/client/actions/Action.js | 2 +- src/client/actions/ActionsManager.js | 5 ++- src/client/actions/ChannelCreate.js | 1 - src/client/actions/ChannelDelete.js | 2 +- src/client/actions/ChannelUpdate.js | 7 ++--- src/client/actions/GuildBanRemove.js | 6 +--- src/client/actions/GuildDelete.js | 11 ++++--- src/client/actions/GuildMemberRemove.js | 31 ++++++++----------- src/client/actions/GuildRoleCreate.js | 12 ++----- src/client/actions/GuildRoleDelete.js | 18 +++++------ src/client/actions/GuildRoleUpdate.js | 21 ++++++------- src/client/actions/GuildSync.js | 5 +-- src/client/actions/GuildUpdate.js | 8 ++--- src/client/actions/MessageCreate.js | 6 ++-- src/client/actions/MessageDelete.js | 9 +++--- src/client/actions/MessageDeleteBulk.js | 6 ++-- src/client/actions/MessageUpdate.js | 2 +- src/client/actions/UserGet.js | 1 - src/client/actions/UserUpdate.js | 2 -- src/client/rest/RESTMethods.js | 6 ++-- .../packets/handlers/MessageCreate.js | 4 +-- .../packets/handlers/MessageDelete.js | 4 +-- 22 files changed, 71 insertions(+), 98 deletions(-) diff --git a/src/client/actions/Action.js b/src/client/actions/Action.js index a92fe45fc..78c5f146a 100644 --- a/src/client/actions/Action.js +++ b/src/client/actions/Action.js @@ -8,7 +8,7 @@ the REST API methods, in order to prevent rewriting code to handle data, used to be but they're strictly for manipulating data and making sure that WebSocket events don't clash with REST methods. - */ +*/ class GenericAction { diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index bb07c00f8..13fbfeae4 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -1,6 +1,5 @@ -const requireAction = name => require(`./${name}`); - class ActionsManager { + constructor(client) { this.client = client; @@ -24,7 +23,7 @@ class ActionsManager { } register(name) { - const Action = requireAction(name); + const Action = require(`./${name}`); this[name] = new Action(this.client); } } diff --git a/src/client/actions/ChannelCreate.js b/src/client/actions/ChannelCreate.js index bfbb6aab1..2d5079b43 100644 --- a/src/client/actions/ChannelCreate.js +++ b/src/client/actions/ChannelCreate.js @@ -5,7 +5,6 @@ class ChannelCreateAction extends Action { handle(data) { const client = this.client; const channel = client.dataManager.newChannel(data); - return { channel, }; diff --git a/src/client/actions/ChannelDelete.js b/src/client/actions/ChannelDelete.js index d56296c2e..5cea1a680 100644 --- a/src/client/actions/ChannelDelete.js +++ b/src/client/actions/ChannelDelete.js @@ -10,8 +10,8 @@ class ChannelDeleteAction extends Action { handle(data) { const client = this.client; - let channel = client.channels.get(data.id); + let channel = client.channels.get(data.id); if (channel) { client.dataManager.killChannel(channel); this.deleted[channel.id] = channel; diff --git a/src/client/actions/ChannelUpdate.js b/src/client/actions/ChannelUpdate.js index ecf74215a..67688c06e 100644 --- a/src/client/actions/ChannelUpdate.js +++ b/src/client/actions/ChannelUpdate.js @@ -6,15 +6,12 @@ class ChannelUpdateAction extends Action { handle(data) { const client = this.client; - const channel = client.channels.get(data.id); + const channel = client.channels.get(data.id); if (channel) { const oldChannel = cloneObject(channel); channel.setup(data); - if (!oldChannel.equals(data)) { - client.emit(Constants.Events.CHANNEL_UPDATE, oldChannel, channel); - } - + if (!oldChannel.equals(data)) client.emit(Constants.Events.CHANNEL_UPDATE, oldChannel, channel); return { old: oldChannel, updated: channel, diff --git a/src/client/actions/GuildBanRemove.js b/src/client/actions/GuildBanRemove.js index e0204ba90..ffed90a28 100644 --- a/src/client/actions/GuildBanRemove.js +++ b/src/client/actions/GuildBanRemove.js @@ -5,13 +5,9 @@ class GuildBanRemove extends Action { handle(data) { const client = this.client; - const guild = client.guilds.get(data.guild_id); const user = client.dataManager.newUser(data.user); - - if (guild && user) { - client.emit(Constants.Events.GUILD_BAN_REMOVE, guild, user); - } + if (guild && user) client.emit(Constants.Events.GUILD_BAN_REMOVE, guild, user); } } diff --git a/src/client/actions/GuildDelete.js b/src/client/actions/GuildDelete.js index 7f21c25e0..6e33e14b9 100644 --- a/src/client/actions/GuildDelete.js +++ b/src/client/actions/GuildDelete.js @@ -10,8 +10,8 @@ class GuildDeleteAction extends Action { handle(data) { const client = this.client; - let guild = client.guilds.get(data.id); + let guild = client.guilds.get(data.id); if (guild) { if (guild.available && data.unavailable) { // guild is unavailable @@ -24,6 +24,7 @@ class GuildDeleteAction extends Action { guild: null, }; } + // delete guild client.guilds.delete(guild.id); this.deleted[guild.id] = guild; @@ -43,10 +44,10 @@ class GuildDeleteAction extends Action { } /** -* Emitted whenever a guild becomes unavailable, likely due to a server outage. -* -* @event Client#guildUnavailable -* @param {Guild} guild the guild that has become unavailable. + * Emitted whenever a guild becomes unavailable, likely due to a server outage. + * + * @event Client#guildUnavailable + * @param {Guild} guild the guild that has become unavailable. */ module.exports = GuildDeleteAction; diff --git a/src/client/actions/GuildMemberRemove.js b/src/client/actions/GuildMemberRemove.js index b7a01d3a4..87acb78a7 100644 --- a/src/client/actions/GuildMemberRemove.js +++ b/src/client/actions/GuildMemberRemove.js @@ -10,6 +10,7 @@ class GuildMemberRemoveAction extends Action { handle(data) { const client = this.client; + const guild = client.guilds.get(data.guild_id); if (guild) { let member = guild.members.get(data.user.id); @@ -17,25 +18,21 @@ class GuildMemberRemoveAction extends Action { guild.memberCount--; guild._removeMember(member); this.deleted[guild.id + data.user.id] = member; - if (client.status === Constants.Status.READY) { - client.emit(Constants.Events.GUILD_MEMBER_REMOVE, guild, member); - } + if (client.status === Constants.Status.READY) client.emit(Constants.Events.GUILD_MEMBER_REMOVE, guild, member); this.scheduleForDeletion(guild.id, data.user.id); - } - - if (!member) { + } else { member = this.deleted[guild.id + data.user.id]; } return { - g: guild, - m: member, + guild, + member, }; } return { - g: guild, - m: null, + guild, + member: null, }; } @@ -44,14 +41,12 @@ class GuildMemberRemoveAction extends Action { } } - /** -* Emitted whenever a member leaves a guild, or is kicked. -* -* @event Client#guildMemberRemove -* @param {Guild} guild the guild that the member has left. -* @param {GuildMember} member the member that has left the guild. -*/ - + * Emitted whenever a member leaves a guild, or is kicked. + * + * @event Client#guildMemberRemove + * @param {Guild} guild the guild that the member has left. + * @param {GuildMember} member the member that has left the guild. + */ module.exports = GuildMemberRemoveAction; diff --git a/src/client/actions/GuildRoleCreate.js b/src/client/actions/GuildRoleCreate.js index a65009682..a6aa9d909 100644 --- a/src/client/actions/GuildRoleCreate.js +++ b/src/client/actions/GuildRoleCreate.js @@ -6,17 +6,13 @@ class GuildRoleCreate extends Action { handle(data) { const client = this.client; - const guild = client.guilds.get(data.guild_id); + const guild = client.guilds.get(data.guild_id); if (guild) { - const already = guild.roles.get(data.role.id); + const already = guild.roles.has(data.role.id); const role = new Role(guild, data.role); guild.roles.set(role.id, role); - - if (!already) { - client.emit(Constants.Events.GUILD_ROLE_CREATE, guild, role); - } - + if (!already) client.emit(Constants.Events.GUILD_ROLE_CREATE, guild, role); return { role, }; @@ -28,7 +24,6 @@ class GuildRoleCreate extends Action { } } - /** * Emitted whenever a guild role is created. * @@ -37,5 +32,4 @@ class GuildRoleCreate extends Action { * @param {Role} role the role that was created. */ - module.exports = GuildRoleCreate; diff --git a/src/client/actions/GuildRoleDelete.js b/src/client/actions/GuildRoleDelete.js index 55f3043e4..5336a2934 100644 --- a/src/client/actions/GuildRoleDelete.js +++ b/src/client/actions/GuildRoleDelete.js @@ -10,23 +10,21 @@ class GuildRoleDeleteAction extends Action { handle(data) { const client = this.client; + const guild = client.guilds.get(data.guild_id); - if (guild) { - let exists = guild.roles.get(data.role_id); - if (exists) { + let role = guild.roles.get(data.role_id); + if (role) { guild.roles.delete(data.role_id); - this.deleted[guild.id + data.role_id] = exists; + this.deleted[guild.id + data.role_id] = role; this.scheduleForDeletion(guild.id, data.role_id); - client.emit(Constants.Events.GUILD_ROLE_DELETE, guild, exists); - } - - if (!exists) { - exists = this.deleted[guild.id + data.role_id]; + client.emit(Constants.Events.GUILD_ROLE_DELETE, guild, role); + } else { + role = this.deleted[guild.id + data.role_id]; } return { - role: exists, + role, }; } diff --git a/src/client/actions/GuildRoleUpdate.js b/src/client/actions/GuildRoleUpdate.js index 30201ecef..3ca6db0db 100644 --- a/src/client/actions/GuildRoleUpdate.js +++ b/src/client/actions/GuildRoleUpdate.js @@ -6,23 +6,22 @@ class GuildRoleUpdateAction extends Action { handle(data) { const client = this.client; + const guild = client.guilds.get(data.guild_id); - - const roleData = data.role; - if (guild) { - let oldRole; - const existingRole = guild.roles.get(roleData.id); - // exists and not the same - if (existingRole && !existingRole.equals(roleData)) { - oldRole = cloneObject(existingRole); - existingRole.setup(data.role); - client.emit(Constants.Events.GUILD_ROLE_UPDATE, guild, oldRole, existingRole); + const roleData = data.role; + let oldRole = null; + + const role = guild.roles.get(roleData.id); + if (role && !role.equals(roleData)) { + oldRole = cloneObject(role); + role.setup(data.role); + client.emit(Constants.Events.GUILD_ROLE_UPDATE, guild, oldRole, role); } return { old: oldRole, - updated: existingRole, + updated: role, }; } diff --git a/src/client/actions/GuildSync.js b/src/client/actions/GuildSync.js index 7d01000db..ae4bd5daa 100644 --- a/src/client/actions/GuildSync.js +++ b/src/client/actions/GuildSync.js @@ -4,11 +4,10 @@ class GuildSync extends Action { handle(data) { const client = this.client; - const guild = client.guilds.get(data.id); + const guild = client.guilds.get(data.id); if (guild) { data.presences = data.presences || []; - data.members = data.members || []; for (const presence of data.presences) { const user = client.users.get(presence.user.id); if (user) { @@ -16,6 +15,8 @@ class GuildSync extends Action { user.game = presence.game; } } + + data.members = data.members || []; for (const syncMember of data.members) { const member = guild.members.get(syncMember.user.id); if (member) { diff --git a/src/client/actions/GuildUpdate.js b/src/client/actions/GuildUpdate.js index 0b7f05f72..b77b878c7 100644 --- a/src/client/actions/GuildUpdate.js +++ b/src/client/actions/GuildUpdate.js @@ -12,16 +12,12 @@ class GuildUpdateAction extends Action { handle(data) { const client = this.client; - const guild = client.guilds.get(data.id); + const guild = client.guilds.get(data.id); if (guild) { const oldGuild = cloneObject(guild); guild.setup(data); - - if (!oldGuild.equals(data)) { - client.emit(Constants.Events.GUILD_UPDATE, oldGuild, guild); - } - + if (!oldGuild.equals(data)) client.emit(Constants.Events.GUILD_UPDATE, oldGuild, guild); return { old: oldGuild, updated: guild, diff --git a/src/client/actions/MessageCreate.js b/src/client/actions/MessageCreate.js index bba4bf83d..c6dbe3b50 100644 --- a/src/client/actions/MessageCreate.js +++ b/src/client/actions/MessageCreate.js @@ -5,17 +5,17 @@ class MessageCreateAction extends Action { handle(data) { const client = this.client; - const channel = client.channels.get(data.channel_id); + const channel = client.channels.get(data.channel_id); if (channel) { const message = channel._cacheMessage(new Message(channel, data, client)); return { - m: message, + message, }; } return { - m: null, + message: null, }; } } diff --git a/src/client/actions/MessageDelete.js b/src/client/actions/MessageDelete.js index c9cbbfafc..f8ca5ee70 100644 --- a/src/client/actions/MessageDelete.js +++ b/src/client/actions/MessageDelete.js @@ -9,6 +9,7 @@ class MessageDeleteAction extends Action { handle(data) { const client = this.client; + const channel = client.channels.get(data.channel_id); if (channel) { let message = channel.messages.get(data.id); @@ -22,18 +23,18 @@ class MessageDeleteAction extends Action { } return { - m: message, + message, }; } return { - m: null, + message: null, }; } scheduleForDeletion(channelID, messageID) { - this.client.setTimeout( - () => delete this.deleted[channelID + messageID], this.client.options.rest_ws_bridge_timeout); + this.client.setTimeout(() => delete this.deleted[channelID + messageID], + this.client.options.rest_ws_bridge_timeout); } } diff --git a/src/client/actions/MessageDeleteBulk.js b/src/client/actions/MessageDeleteBulk.js index 951d3bf73..53d1cbf81 100644 --- a/src/client/actions/MessageDeleteBulk.js +++ b/src/client/actions/MessageDeleteBulk.js @@ -13,6 +13,7 @@ class MessageDeleteBulkAction extends Action { handle(data) { const client = this.client; const channel = client.channels.get(data.channel_id); + const ids = data.ids; const messages = new Collection(); for (const id of ids) { @@ -21,9 +22,8 @@ class MessageDeleteBulkAction extends Action { messages.set(message.id, message); } } - if (messages.size > 0) { - client.emit(Constants.Events.MESSAGE_BULK_DELETE, messages); - } + + if (messages.size > 0) client.emit(Constants.Events.MESSAGE_BULK_DELETE, messages); return { messages, }; diff --git a/src/client/actions/MessageUpdate.js b/src/client/actions/MessageUpdate.js index 644e90c57..9041c090b 100644 --- a/src/client/actions/MessageUpdate.js +++ b/src/client/actions/MessageUpdate.js @@ -6,8 +6,8 @@ class MessageUpdateAction extends Action { handle(data) { const client = this.client; - const channel = client.channels.get(data.channel_id); + const channel = client.channels.get(data.channel_id); if (channel) { const message = channel.messages.get(data.id); if (message && !message.equals(data, true)) { diff --git a/src/client/actions/UserGet.js b/src/client/actions/UserGet.js index 435d046a5..33c3ae84c 100644 --- a/src/client/actions/UserGet.js +++ b/src/client/actions/UserGet.js @@ -5,7 +5,6 @@ class UserGetAction extends Action { handle(data) { const client = this.client; const user = client.dataManager.newUser(data); - return { user, }; diff --git a/src/client/actions/UserUpdate.js b/src/client/actions/UserUpdate.js index 924e25287..ae865f579 100644 --- a/src/client/actions/UserUpdate.js +++ b/src/client/actions/UserUpdate.js @@ -17,9 +17,7 @@ class UserUpdateAction extends Action { const oldUser = cloneObject(client.user); client.user.setup(data); - client.emit(Constants.Events.USER_UPDATE, oldUser, client.user); - return { old: oldUser, updated: client.user, diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index e63c1fb75..795643e88 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -54,7 +54,7 @@ class RESTMethods { $this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, { content, tts, nonce, }, file) - .then(data => resolve($this.rest.client.actions.MessageCreate.handle(data).m)) + .then(data => resolve($this.rest.client.actions.MessageCreate.handle(data).message)) .catch(reject); } @@ -77,7 +77,7 @@ class RESTMethods { resolve(this.rest.client.actions.MessageDelete.handle({ id: message.id, channel_id: message.channel.id, - }).m); + }).message); }) .catch(reject); }); @@ -286,7 +286,7 @@ class RESTMethods { resolve(this.rest.client.actions.GuildMemberRemove.handle({ guild_id: guild.id, user: member.user, - }).m); + }).member); }) .catch(reject); }); diff --git a/src/client/websocket/packets/handlers/MessageCreate.js b/src/client/websocket/packets/handlers/MessageCreate.js index 992d37368..25de28166 100644 --- a/src/client/websocket/packets/handlers/MessageCreate.js +++ b/src/client/websocket/packets/handlers/MessageCreate.js @@ -9,8 +9,8 @@ class MessageCreateHandler extends AbstractHandler { const response = client.actions.MessageCreate.handle(data); - if (response.m) { - client.emit(Constants.Events.MESSAGE_CREATE, response.m); + if (response.message) { + client.emit(Constants.Events.MESSAGE_CREATE, response.message); } } diff --git a/src/client/websocket/packets/handlers/MessageDelete.js b/src/client/websocket/packets/handlers/MessageDelete.js index d387c8e6c..7acc80114 100644 --- a/src/client/websocket/packets/handlers/MessageDelete.js +++ b/src/client/websocket/packets/handlers/MessageDelete.js @@ -9,8 +9,8 @@ class MessageDeleteHandler extends AbstractHandler { const response = client.actions.MessageDelete.handle(data); - if (response.m) { - client.emit(Constants.Events.MESSAGE_DELETE, response.m); + if (response.message) { + client.emit(Constants.Events.MESSAGE_DELETE, response.message); } } From fced6983d9d2351c10efb3146ee6535b5456cdc4 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 3 Sep 2016 22:56:27 +0100 Subject: [PATCH 308/324] GuildMember.roles is now a collection instead of an array --- docs/docs.json | 2 +- src/structures/GuildMember.js | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 95ede7570..8b0cb6816 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472938063512},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":48,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":204,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":221,"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":229,"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":237,"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":244,"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":251,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":213,"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":27,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":133,"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":141,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":156,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":98,"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":109,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":218,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":236,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":255,"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":25,"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":30,"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":35,"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":46,"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":72,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"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":191,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":148,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":157,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":166,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":175,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":184,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":193,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":201,"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":209,"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":222,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":67,"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":72,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":80,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":89,"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":112,"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":121,"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":130,"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":139,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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":12,"date":1472939792886},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":28,"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":46,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":44,"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":27,"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":41,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":35,"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":34,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":34,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":204,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":221,"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":229,"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":237,"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":244,"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":251,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":213,"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":27,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":133,"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":141,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":156,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":98,"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":109,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":218,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":236,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":255,"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":25,"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":30,"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":35,"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":46,"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":72,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"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":191,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":194,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":202,"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":210,"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":223,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":37,"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":42,"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":47,"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":52,"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":57,"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":62,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":68,"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":73,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"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":113,"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":122,"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":131,"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":140,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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/GuildMember.js b/src/structures/GuildMember.js index 643596147..ef3083e2e 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -1,4 +1,5 @@ const TextBasedChannel = require('./interface/TextBasedChannel'); +const Collection = require('../util/Collection'); /** * Represents a Member of a Guild on Discord @@ -82,22 +83,22 @@ class GuildMember { } /** - * A list of roles that are applied to this GuildMember - * @type {Array} + * A list of roles that are applied to this GuildMember, mapped by the role ID. + * @type {Collection} * @readonly */ get roles() { - const list = []; + const list = new Collection(); const everyoneRole = this.guild.roles.get(this.guild.id); if (everyoneRole) { - list.push(everyoneRole); + list.set(everyoneRole.id, everyoneRole); } for (const roleID of this._roles) { const role = this.guild.roles.get(roleID); if (role) { - list.push(role); + list.set(role.id, role); } } From 7f9ea762ed188fac149a343b211ce73c6785e2cb Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 3 Sep 2016 23:00:08 +0100 Subject: [PATCH 309/324] Add Collection.map(); --- docs/docs.json | 2 +- src/util/Collection.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 8b0cb6816..f3fafc7d3 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472939792886},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":28,"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":46,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":44,"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":27,"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":41,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":35,"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":34,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":34,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":204,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":221,"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":229,"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":237,"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":244,"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":251,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":213,"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":27,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":133,"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":141,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":156,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":98,"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":109,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":218,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":236,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":255,"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":25,"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":30,"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":35,"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":46,"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":72,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"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":191,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":194,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":202,"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":210,"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":223,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":37,"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":42,"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":47,"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":52,"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":57,"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":62,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":68,"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":73,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"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":113,"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":122,"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":131,"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":140,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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":12,"date":1472940013206},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":28,"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":46,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":44,"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":27,"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":41,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":35,"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":34,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":34,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":204,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":221,"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":229,"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":237,"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":244,"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":251,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":213,"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":27,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":133,"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":141,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":156,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":98,"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":109,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":218,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":236,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":255,"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":25,"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":30,"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":35,"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":46,"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":72,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"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":191,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":194,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":202,"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":210,"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":223,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":37,"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":42,"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":47,"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":52,"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":57,"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":62,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":68,"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":73,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"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":113,"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":122,"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":131,"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":140,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":151,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments.","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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/util/Collection.js b/src/util/Collection.js index 2a0b1110e..9c85d7353 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -141,6 +141,16 @@ class Collection extends Map { } return collection; } + + /** + * Functionally identical shortcut to `collection.array().map(...)`. + * @param {function} callback Function that produces an element of the new Array, taking three arguments. + * @param {*} [thisArg] Optional. Value to use as this when executing callback. + * @returns {array} + */ + map(...args) { + return this.array().map(...args); + } } module.exports = Collection; From efd1d0c738773497fa52f6617cf32002f7492729 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 3 Sep 2016 23:06:53 +0100 Subject: [PATCH 310/324] rewrite some docs and refactor some names --- docs/docs.json | 2 +- src/client/voice/VoiceConnection.js | 17 +++++++++++------ src/client/voice/dispatcher/StreamDispatcher.js | 9 +++++++++ src/client/voice/receiver/VoiceReceiver.js | 6 ++++++ 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index f3fafc7d3..93c355b8e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472940013206},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":28,"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":46,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":44,"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":27,"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":41,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":35,"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":34,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":34,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":204,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":221,"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":229,"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":237,"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":244,"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":251,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":213,"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":27,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":133,"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":141,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":156,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":98,"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":109,"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","meta":{"line":12,"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":85,"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.log);"],"meta":{"line":218,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":236,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":245,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":255,"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":25,"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":30,"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":35,"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":46,"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":72,"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":113,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":137,"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":191,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":194,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":202,"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":210,"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":223,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":37,"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":42,"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":47,"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":52,"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":57,"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":62,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":68,"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":73,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"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":113,"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":122,"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":131,"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":140,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":151,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments.","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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":12,"date":1472940418470},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":28,"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":46,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":44,"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":27,"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":41,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":35,"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":34,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":34,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":213,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":230,"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":238,"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":246,"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":253,"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":260,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":222,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":142,"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":150,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":165,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":95,"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":104,"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":115,"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});","meta":{"line":17,"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":90,"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.log);"],"meta":{"line":223,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":241,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":250,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":260,"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":30,"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":35,"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":40,"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":51,"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":77,"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":118,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":142,"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":196,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":194,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":202,"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":210,"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":223,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":37,"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":42,"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":47,"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":52,"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":57,"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":62,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":68,"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":73,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"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":113,"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":122,"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":131,"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":140,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":151,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments.","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 7e7442c52..24c1c3ad7 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -6,7 +6,12 @@ const EventEmitter = require('events').EventEmitter; const DefaultPlayer = require('./player/DefaultPlayer'); /** - * Represents a connection to a Voice Channel in Discord + * Represents a connection to a Voice Channel in Discord. + * ```js + * // obtained using: + * voiceChannel.join().then(connection => { + * + * }); * @extends {EventEmitter} */ class VoiceConnection extends EventEmitter { @@ -220,7 +225,7 @@ class VoiceConnection extends EventEmitter { } /** - * Play the given stream in the voice connection + * Plays and converts an audio stream in the voice connection * @param {ReadableStream} stream the audio stream to play * @returns {StreamDispatcher} * @example @@ -238,13 +243,13 @@ class VoiceConnection extends EventEmitter { } /** - * Plays a stream of PCM data - * @param {ReadableStream} pcmStream the PCM stream + * Plays a stream of 16-bit signed stereo PCM at 48KHz. + * @param {ReadableStream} stream the audio stream to play. * @returns {StreamDispatcher} */ - playPCMStream(pcmStream) { + playConvertedStream(stream) { this._shutdown(); - const dispatcher = this.player.playPCMStream(pcmStream); + const dispatcher = this.player.playPCMStream(stream); return dispatcher; } diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 8d1686569..2408c235c 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -6,6 +6,15 @@ nonce.fill(0); /** * The class that sends voice packet data to the voice connection. + * ```js + * // obtained using: + * voiceChannel.join().then(connection => { + * // you can play a file or a stream here: + * connection.playFile('./file.mp3').then(dispatcher => { + * + * }); + * }); + * ``` * @extends {EventEmitter} */ class StreamDispatcher extends EventEmitter { diff --git a/src/client/voice/receiver/VoiceReceiver.js b/src/client/voice/receiver/VoiceReceiver.js index 042da4f42..6862378f8 100644 --- a/src/client/voice/receiver/VoiceReceiver.js +++ b/src/client/voice/receiver/VoiceReceiver.js @@ -7,6 +7,12 @@ nonce.fill(0); /** * Receives voice data from a voice connection. + * ```js + * // obtained using: + * voiceChannel.join().then(connection => { + * const receiver = connection.createReceiver(); + * }); + * ``` * @extends {EventEmitter} */ class VoiceReceiver extends EventEmitter { From a3b9b0f1b475691e4ef328fe4ca096aae4b847e0 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 3 Sep 2016 23:11:50 +0100 Subject: [PATCH 311/324] Fix VC docs --- docs/docs.json | 2 +- src/client/voice/VoiceConnection.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 93c355b8e..0d28019c2 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472940418470},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":28,"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":46,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":44,"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":27,"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":41,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":35,"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":34,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":34,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":213,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":230,"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":238,"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":246,"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":253,"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":260,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":222,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":142,"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":150,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":165,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":95,"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":104,"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":115,"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});","meta":{"line":17,"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":90,"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.log);"],"meta":{"line":223,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":241,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":250,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":260,"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":30,"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":35,"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":40,"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":51,"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":77,"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":118,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":142,"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":196,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":194,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":202,"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":210,"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":223,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":37,"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":42,"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":47,"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":52,"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":57,"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":62,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":68,"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":73,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"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":113,"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":122,"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":131,"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":140,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":151,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments.","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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":12,"date":1472940715713},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":28,"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":46,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":44,"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":27,"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":41,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":35,"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":34,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":34,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":213,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":230,"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":238,"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":246,"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":253,"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":260,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":222,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":142,"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":150,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":165,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":95,"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":104,"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":115,"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":91,"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.log);"],"meta":{"line":224,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":251,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":261,"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":31,"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":36,"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":41,"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":52,"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":78,"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":119,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":143,"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":197,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":194,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":202,"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":210,"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":223,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":37,"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":42,"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":47,"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":52,"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":57,"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":62,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":68,"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":73,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"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":113,"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":122,"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":131,"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":140,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":151,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments.","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 24c1c3ad7..b14f68bba 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -12,6 +12,7 @@ const DefaultPlayer = require('./player/DefaultPlayer'); * voiceChannel.join().then(connection => { * * }); + * ``` * @extends {EventEmitter} */ class VoiceConnection extends EventEmitter { From 5af09d335c4dcb17dfa5e9949187fa6176d2e4b9 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 3 Sep 2016 18:21:31 -0400 Subject: [PATCH 312/324] Switch to maps for action deleted + more cleaning (#592) --- src/client/actions/ChannelDelete.js | 11 +++++------ src/client/actions/GuildDelete.js | 10 +++++----- src/client/actions/GuildMemberRemove.js | 8 ++++---- src/client/actions/GuildRoleDelete.js | 8 ++++---- src/client/actions/GuildUpdate.js | 6 ------ src/client/actions/MessageDelete.js | 10 +++++----- src/client/actions/MessageDeleteBulk.js | 6 ------ 7 files changed, 23 insertions(+), 36 deletions(-) diff --git a/src/client/actions/ChannelDelete.js b/src/client/actions/ChannelDelete.js index 5cea1a680..62fda7f9f 100644 --- a/src/client/actions/ChannelDelete.js +++ b/src/client/actions/ChannelDelete.js @@ -4,8 +4,7 @@ class ChannelDeleteAction extends Action { constructor(client) { super(client); - this.timeouts = []; - this.deleted = {}; + this.deleted = new Map(); } handle(data) { @@ -14,10 +13,10 @@ class ChannelDeleteAction extends Action { let channel = client.channels.get(data.id); if (channel) { client.dataManager.killChannel(channel); - this.deleted[channel.id] = channel; + this.deleted.set(channel.id, channel); this.scheduleForDeletion(channel.id); - } else if (this.deleted[data.id]) { - channel = this.deleted[data.id]; + } else { + channel = this.deleted.get(data.id) || null; } return { @@ -26,7 +25,7 @@ class ChannelDeleteAction extends Action { } scheduleForDeletion(id) { - this.client.setTimeout(() => delete this.deleted[id], this.client.options.rest_ws_bridge_timeout); + this.client.setTimeout(() => this.deleted.delete(id), this.client.options.rest_ws_bridge_timeout); } } diff --git a/src/client/actions/GuildDelete.js b/src/client/actions/GuildDelete.js index 6e33e14b9..2dda23af4 100644 --- a/src/client/actions/GuildDelete.js +++ b/src/client/actions/GuildDelete.js @@ -5,7 +5,7 @@ class GuildDeleteAction extends Action { constructor(client) { super(client); - this.deleted = {}; + this.deleted = new Map(); } handle(data) { @@ -27,10 +27,10 @@ class GuildDeleteAction extends Action { // delete guild client.guilds.delete(guild.id); - this.deleted[guild.id] = guild; + this.deleted.set(guild.id, guild); this.scheduleForDeletion(guild.id); - } else if (this.deleted[data.id]) { - guild = this.deleted[data.id]; + } else { + guild = this.deleted.get(data.id) || null; } return { @@ -39,7 +39,7 @@ class GuildDeleteAction extends Action { } scheduleForDeletion(id) { - this.client.setTimeout(() => delete this.deleted[id], this.client.options.rest_ws_bridge_timeout); + this.client.setTimeout(() => this.deleted.delete(id), this.client.options.rest_ws_bridge_timeout); } } diff --git a/src/client/actions/GuildMemberRemove.js b/src/client/actions/GuildMemberRemove.js index 87acb78a7..c0eb18e64 100644 --- a/src/client/actions/GuildMemberRemove.js +++ b/src/client/actions/GuildMemberRemove.js @@ -5,7 +5,7 @@ class GuildMemberRemoveAction extends Action { constructor(client) { super(client); - this.deleted = {}; + this.deleted = new Map(); } handle(data) { @@ -17,11 +17,11 @@ class GuildMemberRemoveAction extends Action { if (member) { guild.memberCount--; guild._removeMember(member); - this.deleted[guild.id + data.user.id] = member; + this.deleted.set(guild.id + data.user.id, member); if (client.status === Constants.Status.READY) client.emit(Constants.Events.GUILD_MEMBER_REMOVE, guild, member); this.scheduleForDeletion(guild.id, data.user.id); } else { - member = this.deleted[guild.id + data.user.id]; + member = this.deleted.get(guild.id + data.user.id) || null; } return { @@ -37,7 +37,7 @@ class GuildMemberRemoveAction extends Action { } scheduleForDeletion(guildID, userID) { - this.client.setTimeout(() => delete this.deleted[guildID + userID], this.client.options.rest_ws_bridge_timeout); + this.client.setTimeout(() => this.deleted.delete(guildID + userID), this.client.options.rest_ws_bridge_timeout); } } diff --git a/src/client/actions/GuildRoleDelete.js b/src/client/actions/GuildRoleDelete.js index 5336a2934..8cdb89491 100644 --- a/src/client/actions/GuildRoleDelete.js +++ b/src/client/actions/GuildRoleDelete.js @@ -5,7 +5,7 @@ class GuildRoleDeleteAction extends Action { constructor(client) { super(client); - this.deleted = {}; + this.deleted = new Map(); } handle(data) { @@ -16,11 +16,11 @@ class GuildRoleDeleteAction extends Action { let role = guild.roles.get(data.role_id); if (role) { guild.roles.delete(data.role_id); - this.deleted[guild.id + data.role_id] = role; + this.deleted.set(guild.id + data.role_id, role); this.scheduleForDeletion(guild.id, data.role_id); client.emit(Constants.Events.GUILD_ROLE_DELETE, guild, role); } else { - role = this.deleted[guild.id + data.role_id]; + role = this.deleted.get(guild.id + data.role_id) || null; } return { @@ -34,7 +34,7 @@ class GuildRoleDeleteAction extends Action { } scheduleForDeletion(guildID, roleID) { - this.client.setTimeout(() => delete this.deleted[guildID + roleID], this.client.options.rest_ws_bridge_timeout); + this.client.setTimeout(() => this.deleted.delete(guildID + roleID), this.client.options.rest_ws_bridge_timeout); } } diff --git a/src/client/actions/GuildUpdate.js b/src/client/actions/GuildUpdate.js index b77b878c7..6aa0cb2d3 100644 --- a/src/client/actions/GuildUpdate.js +++ b/src/client/actions/GuildUpdate.js @@ -4,12 +4,6 @@ const cloneObject = require('../../util/CloneObject'); class GuildUpdateAction extends Action { - constructor(client) { - super(client); - this.deleted = {}; - this.timeouts = []; - } - handle(data) { const client = this.client; diff --git a/src/client/actions/MessageDelete.js b/src/client/actions/MessageDelete.js index f8ca5ee70..66981cc06 100644 --- a/src/client/actions/MessageDelete.js +++ b/src/client/actions/MessageDelete.js @@ -4,7 +4,7 @@ class MessageDeleteAction extends Action { constructor(client) { super(client); - this.deleted = {}; + this.deleted = new Map(); } handle(data) { @@ -16,10 +16,10 @@ class MessageDeleteAction extends Action { if (message) { channel.messages.delete(message.id); - this.deleted[channel.id + message.id] = message; + this.deleted.set(channel.id + message.id, message); this.scheduleForDeletion(channel.id, message.id); - } else if (this.deleted[channel.id + data.id]) { - message = this.deleted[channel.id + data.id]; + } else { + message = this.deleted.get(channel.id + data.id) || null; } return { @@ -33,7 +33,7 @@ class MessageDeleteAction extends Action { } scheduleForDeletion(channelID, messageID) { - this.client.setTimeout(() => delete this.deleted[channelID + messageID], + this.client.setTimeout(() => this.deleted.delete(channelID + messageID), this.client.options.rest_ws_bridge_timeout); } } diff --git a/src/client/actions/MessageDeleteBulk.js b/src/client/actions/MessageDeleteBulk.js index 53d1cbf81..2fda09d1f 100644 --- a/src/client/actions/MessageDeleteBulk.js +++ b/src/client/actions/MessageDeleteBulk.js @@ -4,12 +4,6 @@ const Constants = require('../../util/Constants'); class MessageDeleteBulkAction extends Action { - constructor(client) { - super(client); - this.timeouts = []; - this.deleted = {}; - } - handle(data) { const client = this.client; const channel = client.channels.get(data.channel_id); From 16fbbde35c0ab5d52c81f69cabda958462ed99d3 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 3 Sep 2016 23:25:20 +0100 Subject: [PATCH 313/324] Make syncGuilds off limits to bot accounts --- docs/docs.json | 2 +- src/client/Client.js | 15 +++++++++++---- src/structures/Guild.js | 6 ++++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 0d28019c2..9342297f8 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472940715713},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":199,"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":208,"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":28,"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":46,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":44,"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":27,"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":41,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":35,"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":34,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":34,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":213,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":230,"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":238,"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":246,"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":253,"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":260,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":222,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":142,"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":150,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":165,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":95,"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":104,"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":115,"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":91,"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.log);"],"meta":{"line":224,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":251,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":261,"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":31,"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":36,"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":41,"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":52,"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":78,"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":119,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":143,"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":197,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds)","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":194,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":202,"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":210,"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":223,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":37,"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":42,"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":47,"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":52,"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":57,"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":62,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":68,"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":73,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"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":113,"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":122,"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":131,"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":140,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":151,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments.","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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":12,"date":1472941525971},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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":181,"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":196,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":206,"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":215,"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":28,"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":46,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":44,"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":27,"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":41,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":35,"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":28,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":34,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":213,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":230,"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":238,"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":246,"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":253,"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":260,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":222,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":142,"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":150,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":165,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":95,"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":104,"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":115,"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":91,"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.log);"],"meta":{"line":224,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":251,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":261,"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":31,"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":36,"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":41,"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":52,"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":78,"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":119,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":143,"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":197,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":194,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":202,"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":210,"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":223,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":37,"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":42,"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":47,"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":52,"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":57,"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":62,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":68,"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":73,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"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":113,"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":122,"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":131,"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":140,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":151,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments.","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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 3aafa8665..6799f271a 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -173,11 +173,18 @@ class Client extends EventEmitter { return timeout; } + /** + * 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 {array} [guilds=this.guilds.array()] An array of guilds to sync. + */ syncGuilds(guilds = this.guilds.array()) { - this.ws.send({ - op: 12, - d: guilds.map(g => g.id), - }); + if (!this.client.user.bot) { + this.ws.send({ + op: 12, + d: guilds.map(g => g.id), + }); + } } /** diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 615d5203e..2d0b76059 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -623,10 +623,12 @@ class Guild { } /** - * Syncs this guild (already done automatically every 30 seconds) + * Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts. */ sync() { - this.client.syncGuilds([this]); + if (!this.client.user.bot) { + this.client.syncGuilds([this]); + } } } From 5a9c42061f1b720de7dd26adb0c8b38a48c72c42 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 3 Sep 2016 23:46:34 +0100 Subject: [PATCH 314/324] Fix permissionsFor --- docs/docs.json | 2 +- src/client/Client.js | 2 +- src/structures/GuildChannel.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 9342297f8..373b4817e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472941525971},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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":181,"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":196,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":206,"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":215,"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":28,"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":46,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":44,"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":27,"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":41,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":35,"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":28,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":34,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":213,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":230,"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":238,"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":246,"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":253,"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":260,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":222,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":142,"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":150,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":165,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":95,"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":104,"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":115,"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":91,"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.log);"],"meta":{"line":224,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":251,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":261,"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":31,"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":36,"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":41,"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":52,"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":78,"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":119,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":143,"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":197,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":194,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":202,"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":210,"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":223,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":37,"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":42,"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":47,"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":52,"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":57,"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":62,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":68,"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":73,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"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":113,"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":122,"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":131,"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":140,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":151,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments.","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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":12,"date":1472942799355},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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":181,"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":196,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":206,"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":215,"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":28,"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":46,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":44,"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":27,"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":41,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":35,"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":28,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":34,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":213,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":230,"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":238,"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":246,"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":253,"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":260,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":222,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":142,"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":150,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":165,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":95,"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":104,"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":115,"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":91,"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.log);"],"meta":{"line":224,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":251,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":261,"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":31,"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":36,"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":41,"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":52,"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":78,"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":119,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":143,"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":197,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":194,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":202,"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":210,"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":223,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":37,"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":42,"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":47,"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":52,"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":57,"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":62,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":68,"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":73,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"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":113,"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":122,"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":131,"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":140,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":151,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments.","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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 6799f271a..79f32165b 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -179,7 +179,7 @@ class Client extends EventEmitter { * @param {array} [guilds=this.guilds.array()] An array of guilds to sync. */ syncGuilds(guilds = this.guilds.array()) { - if (!this.client.user.bot) { + if (!this.user.bot) { this.ws.send({ op: 12, d: guilds.map(g => g.id), diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 720b42807..f345216cd 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -107,7 +107,7 @@ class GuildChannel extends Channel { let permissions = 0; const overwrites = this.overwritesFor(member, true); - for (const role of roles) { + for (const role of roles.values()) { permissions |= role.permissions; } From 0b908f5bce9ba49cebd99f0480fbe0dfa74d6e8d Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 4 Sep 2016 05:08:09 -0400 Subject: [PATCH 315/324] Cleanup Part 2: Electric Boogaloo (Reloaded) (#594) * Cleanup Part 2: Electric Boogaloo (Reloaded) * Moar cleanup * Tweak NOT_A_PERMISSION error --- src/client/Client.js | 20 +- src/client/ClientDataManager.js | 34 +- src/client/ClientDataResolver.js | 117 +++--- src/client/ClientManager.js | 20 +- src/client/actions/Action.js | 2 - src/client/actions/ActionsManager.js | 1 - src/client/actions/ChannelCreate.js | 1 - src/client/actions/ChannelDelete.js | 1 - src/client/actions/ChannelUpdate.js | 12 +- src/client/actions/GuildBanRemove.js | 1 - src/client/actions/GuildDelete.js | 6 +- src/client/actions/GuildMemberRemove.js | 6 +- src/client/actions/GuildRoleCreate.js | 12 +- src/client/actions/GuildRoleDelete.js | 12 +- src/client/actions/GuildRoleUpdate.js | 14 +- src/client/actions/GuildSync.js | 1 - src/client/actions/GuildUpdate.js | 12 +- src/client/actions/MessageCreate.js | 1 - src/client/actions/MessageDelete.js | 1 - src/client/actions/MessageDeleteBulk.js | 5 +- src/client/actions/MessageUpdate.js | 12 +- src/client/actions/UserGet.js | 1 - src/client/actions/UserUpdate.js | 12 +- src/client/rest/APIRequest.js | 9 +- src/client/rest/RESTManager.js | 1 - src/client/rest/RESTMethods.js | 293 +++++---------- .../rest/RequestHandlers/RequestHandler.js | 7 +- src/client/rest/RequestHandlers/Sequential.js | 14 +- src/client/voice/ClientVoiceManager.js | 32 +- src/client/voice/VoiceConnection.js | 37 +- src/client/voice/VoiceConnectionUDPClient.js | 12 +- src/client/voice/VoiceConnectionWebSocket.js | 12 +- .../voice/dispatcher/StreamDispatcher.js | 77 ++-- src/client/voice/opus/NodeOpusEngine.js | 1 - src/client/voice/opus/OpusEngineList.js | 14 +- src/client/voice/opus/OpusScriptEngine.js | 7 +- src/client/voice/pcm/ConverterEngine.js | 2 - src/client/voice/pcm/FfmpegConverterEngine.js | 20 +- src/client/voice/player/BasePlayer.js | 10 +- src/client/voice/player/DefaultPlayer.js | 1 - src/client/voice/receiver/VoiceReadable.js | 6 +- src/client/voice/receiver/VoiceReceiver.js | 46 +-- src/client/websocket/WebSocketManager.js | 68 ++-- .../packets/WebSocketPacketManager.js | 11 +- .../packets/handlers/AbstractHandler.js | 1 - .../packets/handlers/ChannelCreate.js | 19 +- .../packets/handlers/ChannelDelete.js | 19 +- .../packets/handlers/ChannelPinsUpdate.js | 25 +- .../packets/handlers/ChannelUpdate.js | 5 +- .../websocket/packets/handlers/GuildBanAdd.js | 21 +- .../packets/handlers/GuildBanRemove.js | 16 +- .../websocket/packets/handlers/GuildCreate.js | 5 +- .../websocket/packets/handlers/GuildDelete.js | 19 +- .../packets/handlers/GuildMemberAdd.js | 6 +- .../packets/handlers/GuildMemberRemove.js | 5 +- .../packets/handlers/GuildMemberUpdate.js | 9 +- .../packets/handlers/GuildMembersChunk.js | 19 +- .../packets/handlers/GuildRoleCreate.js | 5 +- .../packets/handlers/GuildRoleDelete.js | 5 +- .../packets/handlers/GuildRoleUpdate.js | 5 +- .../websocket/packets/handlers/GuildSync.js | 5 +- .../websocket/packets/handlers/GuildUpdate.js | 5 +- .../packets/handlers/MessageCreate.js | 19 +- .../packets/handlers/MessageDelete.js | 19 +- .../packets/handlers/MessageDeleteBulk.js | 14 +- .../packets/handlers/MessageUpdate.js | 5 +- .../packets/handlers/PresenceUpdate.js | 34 +- .../websocket/packets/handlers/Ready.js | 22 +- .../websocket/packets/handlers/TypingStart.js | 58 ++- .../websocket/packets/handlers/UserUpdate.js | 5 +- .../packets/handlers/VoiceServerUpdate.js | 5 +- .../packets/handlers/VoiceStateUpdate.js | 25 +- src/structures/Channel.js | 8 +- src/structures/ClientUser.js | 14 +- src/structures/DMChannel.js | 2 +- src/structures/Emoji.js | 8 +- src/structures/EvaluatedPermissions.js | 23 +- src/structures/GroupDMChannel.js | 26 +- src/structures/Guild.js | 147 ++++---- src/structures/GuildChannel.js | 70 ++-- src/structures/GuildMember.js | 40 +-- src/structures/Invite.js | 2 +- src/structures/Message.js | 94 ++--- src/structures/MessageEmbed.js | 112 +++--- src/structures/PermissionOverwrites.js | 6 +- src/structures/Role.js | 61 ++-- src/structures/TextChannel.js | 1 - src/structures/User.js | 25 +- src/structures/VoiceChannel.js | 12 +- src/structures/interface/TextBasedChannel.js | 336 ++++++++---------- src/util/ArraysEqual.js | 14 + src/util/CloneObject.js | 1 - src/util/Collection.js | 72 ++-- src/util/Constants.js | 7 +- src/util/MergeDefault.js | 7 +- 95 files changed, 946 insertions(+), 1526 deletions(-) create mode 100644 src/util/ArraysEqual.js diff --git a/src/client/Client.js b/src/client/Client.js index 79f32165b..368f5163f 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -15,10 +15,8 @@ const Collection = require('../util/Collection'); * @extends {EventEmitter} */ class Client extends EventEmitter { - /** - * Creates an instance of Client. - * @param {ClientOptions} [options] options to pass to the client + * @param {ClientOptions} [options] Options for the client */ constructor(options) { super(); @@ -129,17 +127,13 @@ class Client extends EventEmitter { * client.login(email, password); */ login(emailOrToken, password) { - if (password) { - // login with email and password - return this.rest.methods.loginEmailPassword(emailOrToken, password); - } - // login with token + if (password) return this.rest.methods.loginEmailPassword(emailOrToken, password); return this.rest.methods.loginToken(emailOrToken); } /** - * Destroys the client and logs out. Resolves with null if successful. - * @returns {Promise} + * Destroys the client and logs out. + * @returns {Promise} */ destroy() { return new Promise((resolve, reject) => { @@ -152,8 +146,7 @@ class Client extends EventEmitter { this._timeouts = []; this._intervals = []; resolve(); - }) - .catch(reject); + }).catch(reject); }); } @@ -176,7 +169,7 @@ 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 {array} [guilds=this.guilds.array()] An array of guilds to sync. + * @param {Guild[]} [guilds=this.guilds.array()] An array of guilds to sync */ syncGuilds(guilds = this.guilds.array()) { if (!this.user.bot) { @@ -215,7 +208,6 @@ class Client extends EventEmitter { get uptime() { return this.readyTime ? Date.now() - this.readyTime : null; } - } module.exports = Client; diff --git a/src/client/ClientDataManager.js b/src/client/ClientDataManager.js index 62924904e..5c2201810 100644 --- a/src/client/ClientDataManager.js +++ b/src/client/ClientDataManager.js @@ -23,11 +23,10 @@ class ClientDataManager { this.client.guilds.set(guild.id, guild); if (this.pastReady && !already) { /** - * Emitted whenever the client joins a Guild. - * - * @event Client#guildCreate - * @param {Guild} guild the created guild. - */ + * Emitted whenever the client joins a Guild. + * @event Client#guildCreate + * @param {Guild} guild The created guild + */ this.client.emit(Constants.Events.GUILD_CREATE, guild); } @@ -35,16 +34,13 @@ class ClientDataManager { } newUser(data) { - if (this.client.users.has(data.id)) { - return this.client.users.get(data.id); - } + if (this.client.users.has(data.id)) return this.client.users.get(data.id); const user = new User(this.client, data); this.client.users.set(user.id, user); return user; } - newChannel(data, $guild) { - let guild = $guild; + newChannel(data, guild) { const already = this.client.channels.has(data.id); let channel; if (data.type === Constants.ChannelTypes.DM) { @@ -65,22 +61,18 @@ class ClientDataManager { } if (channel) { - if (this.pastReady && !already) { - this.client.emit(Constants.Events.CHANNEL_CREATE, channel); - } - + if (this.pastReady && !already) this.client.emit(Constants.Events.CHANNEL_CREATE, channel); this.client.channels.set(channel.id, channel); return channel; } + return null; } killGuild(guild) { const already = this.client.guilds.has(guild.id); this.client.guilds.delete(guild.id); - if (already && this.pastReady) { - this.client.emit(Constants.Events.GUILD_DELETE, guild); - } + if (already && this.pastReady) this.client.emit(Constants.Events.GUILD_DELETE, guild); } killUser(user) { @@ -89,17 +81,13 @@ class ClientDataManager { killChannel(channel) { this.client.channels.delete(channel.id); - if (channel instanceof GuildChannel) { - channel.guild.channels.delete(channel.id); - } + if (channel instanceof GuildChannel) channel.guild.channels.delete(channel.id); } updateGuild(currentGuild, newData) { const oldGuild = cloneObject(currentGuild); currentGuild.setup(newData); - if (this.pastReady) { - this.client.emit(Constants.Events.GUILD_UPDATE, oldGuild, currentGuild); - } + if (this.pastReady) this.client.emit(Constants.Events.GUILD_UPDATE, oldGuild, currentGuild); } updateChannel(currentChannel, newData) { diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index 6ba335e05..df451124e 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -2,13 +2,12 @@ const path = require('path'); const fs = require('fs'); const request = require('superagent'); -const getStructure = name => require(`../structures/${name}`); - -const User = getStructure('User'); -const Message = getStructure('Message'); -const Guild = getStructure('Guild'); -const Channel = getStructure('Channel'); -const GuildMember = getStructure('GuildMember'); +const Constants = require('../util/constants'); +const User = require(`../structures/User`); +const Message = require(`../structures/Message`); +const Guild = require(`../structures/Guild`); +const Channel = require(`../structures/Channel`); +const GuildMember = require(`../structures/GuildMember`); /** * The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g. @@ -16,7 +15,9 @@ const GuildMember = getStructure('GuildMember'); * @private */ class ClientDataResolver { - + /** + * @param {Client} client The client the resolver is for + */ constructor(client) { this.client = client; } @@ -33,7 +34,7 @@ class ClientDataResolver { /** * Resolves a UserResolvable to a User object - * @param {UserResolvable} user the UserResolvable to identify + * @param {UserResolvable} user The UserResolvable to identify * @returns {?User} */ resolveUser(user) { @@ -60,18 +61,12 @@ class ClientDataResolver { /** * Resolves a GuildResolvable to a Guild object - * @param {GuildResolvable} guild the GuildResolvable to identify + * @param {GuildResolvable} guild The GuildResolvable to identify * @returns {?Guild} */ resolveGuild(guild) { - if (guild instanceof Guild) { - return guild; - } - - if (typeof guild === 'string') { - return this.client.guilds.get(guild); - } - + if (guild instanceof Guild) return guild; + if (typeof guild === 'string') return this.client.guilds.get(guild); return null; } @@ -84,21 +79,16 @@ class ClientDataResolver { /** * Resolves a GuildMemberResolvable to a GuildMember object - * @param {GuildResolvable} guild the guild that the member is part of - * @param {UserResolvable} user the user that is part of the guild + * @param {GuildResolvable} guild The guild that the member is part of + * @param {UserResolvable} user The user that is part of the guild * @returns {?GuildMember} */ resolveGuildMember(guild, user) { - if (user instanceof GuildMember) { - return user; - } + if (user instanceof GuildMember) return user; guild = this.resolveGuild(guild); user = this.resolveUser(user); - - if (!guild || !user) { - return null; - } + if (!guild || !user) return null; return guild.members.get(user.id); } @@ -112,14 +102,11 @@ class ClientDataResolver { /** * Resolves a Base64Resolvable to a Base 64 image - * @param {Base64Resolvable} data the base 64 resolvable you want to resolve + * @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')}`; - } - + if (data instanceof Buffer) return `data:image/jpg;base64,${data.toString('base64')}`; return data; } @@ -132,43 +119,49 @@ class ClientDataResolver { /** * Resolves a ChannelResolvable to a Channel object - * @param {ChannelResolvable} channel the channel resolvable to resolve + * @param {ChannelResolvable} channel The channel resolvable to resolve * @returns {?Channel} */ resolveChannel(channel) { - if (channel instanceof Channel) { - return channel; - } - - if (typeof channel === 'string') { - return this.client.channels.get(channel.id); - } - + if (channel instanceof Channel) return channel; + if (typeof channel === 'string') return this.client.channels.get(channel.id); return null; } + /** + * Data that can be resolved to give a permission number. This can be: + * * A string + * * A permission number + * @typedef {string|number} PermissionResolvable + */ + + /** + * Resolves a PermissionResolvable to a permission number + * @param {PermissionResolvable} permission The permission resolvable to resolve + * @returns {number} + */ + resolvePermission(permission) { + if (typeof permission === 'string') permission = Constants.PermissionFlags[permission]; + if (!permission) throw Constants.Errors.NOT_A_PERMISSION; + return permission; + } + /** * Data that can be resolved to give a string. This can be: * * A string * * An Array (joined with a new line delimiter to give a string) - * * Any object - * @typedef {string|Array|Object} StringResolvable + * * Any value + * @typedef {string|Array|*} StringResolvable */ /** * Resolves a StringResolvable to a string - * @param {StringResolvable} data the string resolvable to resolve + * @param {StringResolvable} data The string resolvable to resolve * @returns {string} */ resolveString(data) { - if (typeof data === 'string') { - return data; - } - - if (data instanceof Array) { - return data.join('\n'); - } - + if (typeof data === 'string') return data; + if (data instanceof Array) return data.join('\n'); return String(data); } @@ -182,8 +175,8 @@ class ClientDataResolver { /** * Resolves a FileResolvable to a Buffer - * @param {FileResolvable} resource the file resolvable to resolve - * @returns {string|Buffer} + * @param {FileResolvable} resource The file resolvable to resolve + * @returns {Promise} */ resolveFile(resource) { if (typeof resource === 'string') { @@ -194,19 +187,19 @@ class ClientDataResolver { .end((err, res) => err ? reject(err) : resolve(res.body)); } else { const file = path.resolve(resource); - const stat = fs.statSync(file); - if (!stat.isFile()) { - throw new Error(`The file could not be found: ${file}`); - } - - fs.readFile(file, (err, data) => { - if (err) reject(err); else resolve(data); + fs.stat(file, (err, stats) => { + if (err) reject(err); + if (!stats.isFile()) throw new Error(`The file could not be found: ${file}`); + fs.readFile(file, (err2, data) => { + if (err2) reject(err2); else resolve(data); + }); }); } }); } - return Promise.resolve(resource); + if (resource instanceof Buffer) return Promise.resolve(resource); + return Promise.reject(new TypeError('resource is not a string or Buffer')); } } diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index 7b1f411ad..cf4b26284 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -5,7 +5,6 @@ const Constants = require('../util/Constants'); * @private */ class ClientManager { - constructor(client) { /** * The Client that instantiated this Manager @@ -21,25 +20,22 @@ class ClientManager { /** * Connects the Client to the WebSocket - * @param {string} token the authorization token - * @param {function} resolve function to run when connection is successful - * @param {function} reject function to run when connection fails + * @param {string} token The authorization token + * @param {function} resolve Function to run when connection is successful + * @param {function} reject Function to run when connection fails */ connectToWebSocket(token, resolve, reject) { this.client.token = token; - this.client.rest.methods.getGateway() - .then(gateway => { - this.client.ws.connect(gateway); - this.client.once(Constants.Events.READY, () => resolve(token)); - }) - .catch(reject); - + this.client.rest.methods.getGateway().then(gateway => { + this.client.ws.connect(gateway); + this.client.once(Constants.Events.READY, () => resolve(token)); + }).catch(reject); this.client.setTimeout(() => reject(Constants.Errors.TOOK_TOO_LONG), 1000 * 300); } /** * Sets up a keep-alive interval to keep the Client's connection valid - * @param {number} time the interval in milliseconds at which heartbeat packets should be sent + * @param {number} time The interval in milliseconds at which heartbeat packets should be sent */ setupKeepAlive(time) { this.heartbeatInterval = this.client.setInterval(() => { diff --git a/src/client/actions/Action.js b/src/client/actions/Action.js index 78c5f146a..8fdadc92b 100644 --- a/src/client/actions/Action.js +++ b/src/client/actions/Action.js @@ -11,7 +11,6 @@ that WebSocket events don't clash with REST methods. */ class GenericAction { - constructor(client) { this.client = client; } @@ -19,7 +18,6 @@ class GenericAction { handle(data) { return data; } - } module.exports = GenericAction; diff --git a/src/client/actions/ActionsManager.js b/src/client/actions/ActionsManager.js index 13fbfeae4..e70cdcbd8 100644 --- a/src/client/actions/ActionsManager.js +++ b/src/client/actions/ActionsManager.js @@ -1,5 +1,4 @@ class ActionsManager { - constructor(client) { this.client = client; diff --git a/src/client/actions/ChannelCreate.js b/src/client/actions/ChannelCreate.js index 2d5079b43..dc4704152 100644 --- a/src/client/actions/ChannelCreate.js +++ b/src/client/actions/ChannelCreate.js @@ -1,7 +1,6 @@ const Action = require('./Action'); class ChannelCreateAction extends Action { - handle(data) { const client = this.client; const channel = client.dataManager.newChannel(data); diff --git a/src/client/actions/ChannelDelete.js b/src/client/actions/ChannelDelete.js index 62fda7f9f..b54783bcc 100644 --- a/src/client/actions/ChannelDelete.js +++ b/src/client/actions/ChannelDelete.js @@ -1,7 +1,6 @@ const Action = require('./Action'); class ChannelDeleteAction extends Action { - constructor(client) { super(client); this.deleted = new Map(); diff --git a/src/client/actions/ChannelUpdate.js b/src/client/actions/ChannelUpdate.js index 67688c06e..636addd2e 100644 --- a/src/client/actions/ChannelUpdate.js +++ b/src/client/actions/ChannelUpdate.js @@ -3,7 +3,6 @@ const Constants = require('../../util/Constants'); const cloneObject = require('../../util/CloneObject'); class ChannelUpdateAction extends Action { - handle(data) { const client = this.client; @@ -26,11 +25,10 @@ class ChannelUpdateAction extends Action { } /** -* Emitted whenever a channel is updated - e.g. name change, topic change. -* -* @event Client#channelUpdate -* @param {Channel} oldChannel the channel before the update -* @param {Channel} newChannel the channel after the update -*/ + * Emitted whenever a channel is updated - e.g. name change, topic change. + * @event Client#channelUpdate + * @param {Channel} oldChannel The channel before the update + * @param {Channel} newChannel The channel after the update + */ module.exports = ChannelUpdateAction; diff --git a/src/client/actions/GuildBanRemove.js b/src/client/actions/GuildBanRemove.js index ffed90a28..0276a523f 100644 --- a/src/client/actions/GuildBanRemove.js +++ b/src/client/actions/GuildBanRemove.js @@ -2,7 +2,6 @@ const Action = require('./Action'); const Constants = require('../../util/Constants'); class GuildBanRemove extends Action { - handle(data) { const client = this.client; const guild = client.guilds.get(data.guild_id); diff --git a/src/client/actions/GuildDelete.js b/src/client/actions/GuildDelete.js index 2dda23af4..a8a6a3bbf 100644 --- a/src/client/actions/GuildDelete.js +++ b/src/client/actions/GuildDelete.js @@ -2,7 +2,6 @@ const Action = require('./Action'); const Constants = require('../../util/Constants'); class GuildDeleteAction extends Action { - constructor(client) { super(client); this.deleted = new Map(); @@ -45,9 +44,8 @@ class GuildDeleteAction extends Action { /** * Emitted whenever a guild becomes unavailable, likely due to a server outage. - * * @event Client#guildUnavailable - * @param {Guild} guild the guild that has become unavailable. -*/ + * @param {Guild} guild The guild that has become unavailable. + */ module.exports = GuildDeleteAction; diff --git a/src/client/actions/GuildMemberRemove.js b/src/client/actions/GuildMemberRemove.js index c0eb18e64..7b21db16a 100644 --- a/src/client/actions/GuildMemberRemove.js +++ b/src/client/actions/GuildMemberRemove.js @@ -2,7 +2,6 @@ const Action = require('./Action'); const Constants = require('../../util/Constants'); class GuildMemberRemoveAction extends Action { - constructor(client) { super(client); this.deleted = new Map(); @@ -43,10 +42,9 @@ class GuildMemberRemoveAction extends Action { /** * Emitted whenever a member leaves a guild, or is kicked. - * * @event Client#guildMemberRemove - * @param {Guild} guild the guild that the member has left. - * @param {GuildMember} member the member that has left the guild. + * @param {Guild} guild The guild that the member has left. + * @param {GuildMember} member The member that has left the guild. */ module.exports = GuildMemberRemoveAction; diff --git a/src/client/actions/GuildRoleCreate.js b/src/client/actions/GuildRoleCreate.js index a6aa9d909..206fb043a 100644 --- a/src/client/actions/GuildRoleCreate.js +++ b/src/client/actions/GuildRoleCreate.js @@ -3,7 +3,6 @@ const Constants = require('../../util/Constants'); const Role = require('../../structures/Role'); class GuildRoleCreate extends Action { - handle(data) { const client = this.client; @@ -25,11 +24,10 @@ class GuildRoleCreate extends Action { } /** -* Emitted whenever a guild role is created. -* -* @event Client#guildRoleCreate -* @param {Guild} guild the guild that the role was created in. -* @param {Role} role the role that was created. -*/ + * Emitted whenever a guild role is created. + * @event Client#guildRoleCreate + * @param {Guild} guild The guild that the role was created in. + * @param {Role} role The role that was created. + */ module.exports = GuildRoleCreate; diff --git a/src/client/actions/GuildRoleDelete.js b/src/client/actions/GuildRoleDelete.js index 8cdb89491..fe4edcceb 100644 --- a/src/client/actions/GuildRoleDelete.js +++ b/src/client/actions/GuildRoleDelete.js @@ -2,7 +2,6 @@ const Action = require('./Action'); const Constants = require('../../util/Constants'); class GuildRoleDeleteAction extends Action { - constructor(client) { super(client); this.deleted = new Map(); @@ -39,11 +38,10 @@ class GuildRoleDeleteAction extends Action { } /** -* Emitted whenever a guild role is deleted. -* -* @event Client#guildRoleDelete -* @param {Guild} guild the guild that the role was deleted in. -* @param {Role} role the role that was deleted. -*/ + * Emitted whenever a guild role is deleted. + * @event Client#guildRoleDelete + * @param {Guild} guild The guild that the role was deleted in. + * @param {Role} role The role that was deleted. + */ module.exports = GuildRoleDeleteAction; diff --git a/src/client/actions/GuildRoleUpdate.js b/src/client/actions/GuildRoleUpdate.js index 3ca6db0db..81baf652d 100644 --- a/src/client/actions/GuildRoleUpdate.js +++ b/src/client/actions/GuildRoleUpdate.js @@ -3,7 +3,6 @@ const Constants = require('../../util/Constants'); const cloneObject = require('../../util/CloneObject'); class GuildRoleUpdateAction extends Action { - handle(data) { const client = this.client; @@ -33,12 +32,11 @@ class GuildRoleUpdateAction extends Action { } /** -* Emitted whenever a guild role is updated. -* -* @event Client#guildRoleUpdated -* @param {Guild} guild the guild that the role was updated in. -* @param {Role} oldRole the role before the update. -* @param {Role} newRole the role after the update. -*/ + * Emitted whenever a guild role is updated. + * @event Client#guildRoleUpdated + * @param {Guild} guild The guild that the role was updated in. + * @param {Role} oldRole The role before the update. + * @param {Role} newRole The role after the update. + */ module.exports = GuildRoleUpdateAction; diff --git a/src/client/actions/GuildSync.js b/src/client/actions/GuildSync.js index ae4bd5daa..763acf788 100644 --- a/src/client/actions/GuildSync.js +++ b/src/client/actions/GuildSync.js @@ -1,7 +1,6 @@ const Action = require('./Action'); class GuildSync extends Action { - handle(data) { const client = this.client; diff --git a/src/client/actions/GuildUpdate.js b/src/client/actions/GuildUpdate.js index 6aa0cb2d3..c1cdf6d6c 100644 --- a/src/client/actions/GuildUpdate.js +++ b/src/client/actions/GuildUpdate.js @@ -3,7 +3,6 @@ const Constants = require('../../util/Constants'); const cloneObject = require('../../util/CloneObject'); class GuildUpdateAction extends Action { - handle(data) { const client = this.client; @@ -26,11 +25,10 @@ class GuildUpdateAction extends Action { } /** -* Emitted whenever a guild is updated - e.g. name change. -* -* @event Client#guildUpdate -* @param {Guild} oldGuild the guild before the update. -* @param {Guild} newGuild the guild after the update. -*/ + * Emitted whenever a guild is updated - e.g. name change. + * @event Client#guildUpdate + * @param {Guild} oldGuild The guild before the update. + * @param {Guild} newGuild The guild after the update. + */ module.exports = GuildUpdateAction; diff --git a/src/client/actions/MessageCreate.js b/src/client/actions/MessageCreate.js index c6dbe3b50..10626179c 100644 --- a/src/client/actions/MessageCreate.js +++ b/src/client/actions/MessageCreate.js @@ -2,7 +2,6 @@ const Action = require('./Action'); const Message = require('../../structures/Message'); class MessageCreateAction extends Action { - handle(data) { const client = this.client; diff --git a/src/client/actions/MessageDelete.js b/src/client/actions/MessageDelete.js index 66981cc06..5618efacb 100644 --- a/src/client/actions/MessageDelete.js +++ b/src/client/actions/MessageDelete.js @@ -1,7 +1,6 @@ const Action = require('./Action'); class MessageDeleteAction extends Action { - constructor(client) { super(client); this.deleted = new Map(); diff --git a/src/client/actions/MessageDeleteBulk.js b/src/client/actions/MessageDeleteBulk.js index 2fda09d1f..6a12ef19b 100644 --- a/src/client/actions/MessageDeleteBulk.js +++ b/src/client/actions/MessageDeleteBulk.js @@ -3,7 +3,6 @@ const Collection = require('../../util/Collection'); const Constants = require('../../util/Constants'); class MessageDeleteBulkAction extends Action { - handle(data) { const client = this.client; const channel = client.channels.get(data.channel_id); @@ -12,9 +11,7 @@ class MessageDeleteBulkAction extends Action { const messages = new Collection(); for (const id of ids) { const message = channel.messages.get(id); - if (message) { - messages.set(message.id, message); - } + if (message) messages.set(message.id, message); } if (messages.size > 0) client.emit(Constants.Events.MESSAGE_BULK_DELETE, messages); diff --git a/src/client/actions/MessageUpdate.js b/src/client/actions/MessageUpdate.js index 9041c090b..59c84dd30 100644 --- a/src/client/actions/MessageUpdate.js +++ b/src/client/actions/MessageUpdate.js @@ -3,7 +3,6 @@ const Constants = require('../../util/Constants'); const cloneObject = require('../../util/CloneObject'); class MessageUpdateAction extends Action { - handle(data) { const client = this.client; @@ -34,11 +33,10 @@ class MessageUpdateAction extends Action { } /** -* Emitted whenever a message is updated - e.g. embed or content change. -* -* @event Client#messageUpdate -* @param {Message} oldMessage the message before the update. -* @param {Message} newMessage the message after the update. -*/ + * Emitted whenever a message is updated - e.g. embed or content change. + * @event Client#messageUpdate + * @param {Message} oldMessage The message before the update. + * @param {Message} newMessage The message after the update. + */ module.exports = MessageUpdateAction; diff --git a/src/client/actions/UserGet.js b/src/client/actions/UserGet.js index 33c3ae84c..65e7c9540 100644 --- a/src/client/actions/UserGet.js +++ b/src/client/actions/UserGet.js @@ -1,7 +1,6 @@ const Action = require('./Action'); class UserGetAction extends Action { - handle(data) { const client = this.client; const user = client.dataManager.newUser(data); diff --git a/src/client/actions/UserUpdate.js b/src/client/actions/UserUpdate.js index ae865f579..a8d479465 100644 --- a/src/client/actions/UserUpdate.js +++ b/src/client/actions/UserUpdate.js @@ -3,7 +3,6 @@ const Constants = require('../../util/Constants'); const cloneObject = require('../../util/CloneObject'); class UserUpdateAction extends Action { - handle(data) { const client = this.client; @@ -32,11 +31,10 @@ class UserUpdateAction extends Action { } /** -* Emitted whenever a detail of the logged in User changes - e.g. username. -* -* @event Client#userUpdate -* @param {ClientUser} oldClientUser the client user before the update. -* @param {ClientUser} newClientUser the client user after the update. -*/ + * Emitted whenever a detail of the logged in User changes - e.g. username. + * @event Client#userUpdate + * @param {ClientUser} oldClientUser The client user before the update. + * @param {ClientUser} newClientUser The client user after the update. + */ module.exports = UserUpdateAction; diff --git a/src/client/rest/APIRequest.js b/src/client/rest/APIRequest.js index c56d1ebf1..e8e9c594f 100644 --- a/src/client/rest/APIRequest.js +++ b/src/client/rest/APIRequest.js @@ -26,17 +26,12 @@ class APIRequest { gen() { const apiRequest = request[this.method](this.url); - if (this.auth) { - apiRequest.set('authorization', this.getAuth()); - } + if (this.auth) apiRequest.set('authorization', this.getAuth()); if (this.file && this.file.file) { apiRequest.set('Content-Type', 'multipart/form-data'); apiRequest.attach('file', this.file.file, this.file.name); } - if (this.data) { - apiRequest.send(this.data); - } - + if (this.data) apiRequest.send(this.data); apiRequest.set('User-Agent', this.rest.userAgentManager.userAgent); return apiRequest; } diff --git a/src/client/rest/RESTManager.js b/src/client/rest/RESTManager.js index 716b30279..9af4712da 100644 --- a/src/client/rest/RESTManager.js +++ b/src/client/rest/RESTManager.js @@ -5,7 +5,6 @@ const APIRequest = require('./APIRequest'); const Constants = require('../../util/Constants'); class RESTManager { - constructor(client) { this.client = client; this.handlers = {}; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 795643e88..884841c5e 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -1,11 +1,11 @@ const Constants = require('../../util/Constants'); const Collection = require('../../util/Collection'); -const getStructure = name => require(`../../structures/${name}`); -const User = getStructure('User'); -const GuildMember = getStructure('GuildMember'); -const Role = getStructure('Role'); -const Invite = getStructure('Invite'); +const requireStructure = name => require(`../../structures/${name}`); +const User = requireStructure('User'); +const GuildMember = requireStructure('GuildMember'); +const Role = requireStructure('Role'); +const Invite = requireStructure('Invite'); class RESTMethods { constructor(restManager) { @@ -45,10 +45,9 @@ class RESTMethods { }); } - sendMessage($channel, content, tts, nonce, file) { + sendMessage(channel, content, tts, nonce, file) { return new Promise((resolve, reject) => { const $this = this; - let channel = $channel; function req() { $this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, { @@ -101,11 +100,9 @@ class RESTMethods { return new Promise((resolve, reject) => { this.rest.makeRequest('patch', Constants.Endpoints.channelMessage(message.channel.id, message.id), true, { content, - }) - .then(data => { + }).then(data => { resolve(this.rest.client.actions.MessageUpdate.handle(data).updated); - }) - .catch(reject); + }).catch(reject); }); } @@ -114,11 +111,9 @@ class RESTMethods { this.rest.makeRequest('post', Constants.Endpoints.guildChannels(guild.id), true, { name: channelName, type: channelType, - }) - .then(data => { - resolve(this.rest.client.actions.ChannelCreate.handle(data).channel); - }) - .catch(reject); + }).then(data => { + resolve(this.rest.client.actions.ChannelCreate.handle(data).channel); + }).catch(reject); }); } @@ -126,98 +121,73 @@ class RESTMethods { const dmChannel = Array.from(this.rest.client.channels.values()) .filter(channel => channel.recipient) .filter(channel => channel.recipient.id === recipient.id); - return dmChannel[0]; } createDM(recipient) { return new Promise((resolve, reject) => { const dmChannel = this.getExistingDM(recipient); - - if (dmChannel) { - return resolve(dmChannel); - } - + if (dmChannel) return resolve(dmChannel); return this.rest.makeRequest('post', Constants.Endpoints.userChannels(this.rest.client.user.id), true, { recipient_id: recipient.id, - }) - .then(data => resolve(this.rest.client.actions.ChannelCreate.handle(data).channel)) - .catch(reject); + }).then(data => resolve(this.rest.client.actions.ChannelCreate.handle(data).channel)).catch(reject); }); } - deleteChannel($channel) { - let channel = $channel; + deleteChannel(channel) { return new Promise((resolve, reject) => { - if (channel instanceof User || channel instanceof GuildMember) { - channel = this.getExistingDM(channel); - } - - this.rest.makeRequest('del', Constants.Endpoints.channel(channel.id), true) - .then($data => { - const data = $data; - data.id = channel.id; - resolve(this.rest.client.actions.ChannelDelete.handle(data).channel); - }) - .catch(reject); + if (channel instanceof User || channel instanceof GuildMember) channel = this.getExistingDM(channel); + this.rest.makeRequest('del', Constants.Endpoints.channel(channel.id), true).then(data => { + data.id = channel.id; + resolve(this.rest.client.actions.ChannelDelete.handle(data).channel); + }).catch(reject); }); } - updateChannel(channel, $data) { - const data = $data; + updateChannel(channel, data) { return new Promise((resolve, reject) => { data.name = (data.name || channel.name).trim(); data.topic = data.topic || channel.topic; data.position = data.position || channel.position; data.bitrate = data.bitrate || channel.bitrate; - this.rest.makeRequest('patch', Constants.Endpoints.channel(channel.id), true, data) - .then(newData => { - resolve(this.rest.client.actions.ChannelUpdate.handle(newData).updated); - }) - .catch(reject); + this.rest.makeRequest('patch', Constants.Endpoints.channel(channel.id), true, data).then(newData => { + resolve(this.rest.client.actions.ChannelUpdate.handle(newData).updated); + }).catch(reject); }); } leaveGuild(guild) { - if (guild.ownerID === this.rest.client.user.id) { - return this.deleteGuild(guild); - } + if (guild.ownerID === this.rest.client.user.id) return this.deleteGuild(guild); return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.meGuild(guild.id), true) - .then(() => { - resolve(this.rest.client.actions.GuildDelete.handle({ id: guild.id }).guild); - }) - .catch(reject); + this.rest.makeRequest('del', Constants.Endpoints.meGuild(guild.id), true).then(() => { + resolve(this.rest.client.actions.GuildDelete.handle({ id: guild.id }).guild); + }).catch(reject); }); } // untested but probably will work deleteGuild(guild) { return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.guild(guild.id), true) - .then(() => { - resolve(this.rest.client.actions.GuildDelete.handle({ id: guild.id }).guild); - }) - .catch(reject); + this.rest.makeRequest('del', Constants.Endpoints.guild(guild.id), true).then(() => { + resolve(this.rest.client.actions.GuildDelete.handle({ id: guild.id }).guild); + }).catch(reject); }); } getUser(userID) { return new Promise((resolve, reject) => { - this.rest.makeRequest('get', Constants.Endpoints.user(userID), true) - .then((data) => { - resolve(this.rest.client.actions.UserGet.handle(data).user); - }) - .catch(reject); + this.rest.makeRequest('get', Constants.Endpoints.user(userID), true).then((data) => { + resolve(this.rest.client.actions.UserGet.handle(data).user); + }).catch(reject); }); } updateCurrentUser(_data) { return new Promise((resolve, reject) => { const user = this.rest.client.user; - const data = {}; + const data = {}; data.username = _data.username || user.username; data.avatar = this.rest.client.resolver.resolveBase64(_data.avatar) || user.avatar; if (!user.bot) { @@ -234,44 +204,15 @@ class RESTMethods { updateGuild(guild, _data) { return new Promise((resolve, reject) => { - /* - can contain: - name, region, verificationLevel, afkChannel, afkTimeout, icon, owner, splash - */ - const data = {}; - - if (_data.name) { - data.name = _data.name; - } - - if (_data.region) { - data.region = _data.region; - } - - if (_data.verificationLevel) { - data.verification_level = Number(_data.verificationLevel); - } - - if (_data.afkChannel) { - data.afk_channel_id = this.rest.client.resolver.resolveChannel(_data.afkChannel).id; - } - - if (_data.afkTimeout) { - data.afk_timeout = Number(_data.afkTimeout); - } - - if (_data.icon) { - data.icon = this.rest.client.resolver.resolveBase64(_data.icon); - } - - if (_data.owner) { - data.owner_id = this.rest.client.resolver.resolveUser(_data.owner).id; - } - - if (_data.splash) { - data.splash = this.rest.client.resolver.resolveBase64(_data.splash); - } + if (_data.name) data.name = _data.name; + if (_data.region) data.region = _data.region; + if (_data.verificationLevel) data.verification_level = Number(_data.verificationLevel); + if (_data.afkChannel) data.afk_channel_id = this.rest.client.resolver.resolveChannel(_data.afkChannel).id; + if (_data.afkTimeout) data.afk_timeout = Number(_data.afkTimeout); + if (_data.icon) data.icon = this.rest.client.resolver.resolveBase64(_data.icon); + if (_data.owner) data.owner_id = this.rest.client.resolver.resolveUser(_data.owner).id; + if (_data.splash) data.splash = this.rest.client.resolver.resolveBase64(_data.splash); this.rest.makeRequest('patch', Constants.Endpoints.guild(guild.id), true, data) .then(newData => resolve(this.rest.client.actions.GuildUpdate.handle(newData).updated)) @@ -281,40 +222,34 @@ class RESTMethods { kickGuildMember(guild, member) { return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.guildMember(guild.id, member.id), true) - .then(() => { - resolve(this.rest.client.actions.GuildMemberRemove.handle({ - guild_id: guild.id, - user: member.user, - }).member); - }) - .catch(reject); + this.rest.makeRequest('del', Constants.Endpoints.guildMember(guild.id, member.id), true).then(() => { + resolve(this.rest.client.actions.GuildMemberRemove.handle({ + guild_id: guild.id, + user: member.user, + }).member); + }).catch(reject); }); } createGuildRole(guild) { return new Promise((resolve, reject) => { - this.rest.makeRequest('post', Constants.Endpoints.guildRoles(guild.id), true) - .then(role => { - resolve(this.rest.client.actions.GuildRoleCreate.handle({ - guild_id: guild.id, - role, - }).role); - }) - .catch(reject); + this.rest.makeRequest('post', Constants.Endpoints.guildRoles(guild.id), true).then(role => { + resolve(this.rest.client.actions.GuildRoleCreate.handle({ + guild_id: guild.id, + role, + }).role); + }).catch(reject); }); } deleteGuildRole(role) { return new Promise((resolve, reject) => { - this.rest.makeRequest('del', Constants.Endpoints.guildRole(role.guild.id, role.id), true) - .then(() => { - resolve(this.rest.client.actions.GuildRoleDelete.handle({ - guild_id: role.guild.id, - role_id: role.id, - }).role); - }) - .catch(reject); + this.rest.makeRequest('del', Constants.Endpoints.guildRole(role.guild.id, role.id), true).then(() => { + resolve(this.rest.client.actions.GuildRoleDelete.handle({ + guild_id: role.guild.id, + role_id: role.id, + }).role); + }).catch(reject); }); } @@ -338,23 +273,14 @@ class RESTMethods { getChannelMessages(channel, payload = {}) { return new Promise((resolve, reject) => { const params = []; - if (payload.limit) { - params.push(`limit=${payload.limit}`); - } - if (payload.around) { - params.push(`around=${payload.around}`); - } else if (payload.before) { - params.push(`before=${payload.before}`); - } else if (payload.after) { - params.push(`after=${payload.after}`); - } + if (payload.limit) params.push(`limit=${payload.limit}`); + if (payload.around) params.push(`around=${payload.around}`); + else if (payload.before) params.push(`before=${payload.before}`); + else if (payload.after) params.push(`after=${payload.after}`); - let request = Constants.Endpoints.channelMessages(channel.id); - if (params.length > 0) { - request += `?${params.join('&')}`; - } - - this.rest.makeRequest('get', request, true) + let endpoint = Constants.Endpoints.channelMessages(channel.id); + if (params.length > 0) endpoint += `?${params.join('&')}`; + this.rest.makeRequest('get', endpoint, true) .then(resolve) .catch(reject); }); @@ -362,13 +288,9 @@ class RESTMethods { updateGuildMember(member, data) { return new Promise((resolve, reject) => { - if (data.channel) { - data.channel_id = this.rest.client.resolver.resolveChannel(data.channel).id; - } + if (data.channel) data.channel_id = this.rest.client.resolver.resolveChannel(data.channel).id; if (data.roles) { - if (data.roles instanceof Map) { - data.roles = data.roles.array(); - } + if (data.roles instanceof Collection) data.roles = data.roles.array(); data.roles = data.roles.map(role => role instanceof Role ? role.id : role); } @@ -379,6 +301,7 @@ class RESTMethods { endpoint = Constants.Endpoints.stupidInconsistentGuildEndpoint(member.guild.id); } } + this.rest.makeRequest('patch', endpoint, true, data) .then(resData => resolve(member.guild._updateMember(member, resData).mem)) .catch(reject); @@ -407,9 +330,7 @@ class RESTMethods { unbanGuildMember(guild, member) { return new Promise((resolve, reject) => { member = this.rest.client.resolver.resolveUser(member); - if (!member) { - throw new Error('cannot unban a user that is not a user resolvable'); - } + if (!member) throw new Error('cannot unban a user that is not a user resolvable'); const listener = (eGuild, eUser) => { if (guild.id === guild.id && member.id === eUser.id) { this.rest.client.removeListener(Constants.Events.GUILD_BAN_REMOVE, listener); @@ -423,48 +344,30 @@ class RESTMethods { getGuildBans(guild) { return new Promise((resolve, reject) => { - this.rest.makeRequest('get', Constants.Endpoints.guildBans(guild.id), true) - .then(banItems => { - const bannedUsers = new Collection(); - for (const banItem of banItems) { - const user = this.rest.client.dataManager.newUser(banItem.user); - bannedUsers.set(user.id, user); - } - resolve(bannedUsers); - }) - .catch(reject); + this.rest.makeRequest('get', Constants.Endpoints.guildBans(guild.id), true).then(banItems => { + const bannedUsers = new Collection(); + for (const banItem of banItems) { + const user = this.rest.client.dataManager.newUser(banItem.user); + bannedUsers.set(user.id, user); + } + resolve(bannedUsers); + }).catch(reject); }); } updateGuildRole(role, _data) { return new Promise((resolve, reject) => { - /* - can contain: - name, position, permissions, color, hoist - */ - const data = {}; - data.name = _data.name || role.name; data.position = _data.position || role.position; data.color = _data.color || role.color; - - if (data.color.startsWith('#')) { - data.color = parseInt(data.color.replace('#', ''), 16); - } - - if (typeof _data.hoist !== 'undefined') { - data.hoist = _data.hoist; - } else { - data.hoist = role.hoist; - } + if (data.color.startsWith('#')) data.color = parseInt(data.color.replace('#', ''), 16); + data.hoist = typeof _data.hoist !== 'undefined' ? _data.hoist : role.hoist; if (_data.permissions) { let perms = 0; for (let perm of _data.permissions) { - if (typeof perm === 'string') { - perm = Constants.PermissionFlags[perm]; - } + if (typeof perm === 'string') perm = Constants.PermissionFlags[perm]; perms |= perm; } data.permissions = perms; @@ -472,14 +375,12 @@ class RESTMethods { data.permissions = role.permissions; } - this.rest.makeRequest('patch', Constants.Endpoints.guildRole(role.guild.id, role.id), true, data) - .then(_role => { - resolve(this.rest.client.actions.GuildRoleUpdate.handle({ - role: _role, - guild_id: role.guild.id, - }).updated); - }) - .catch(reject); + this.rest.makeRequest('patch', Constants.Endpoints.guildRole(role.guild.id, role.id), true, data).then(_role => { + resolve(this.rest.client.actions.GuildRoleUpdate.handle({ + role: _role, + guild_id: role.guild.id, + }).updated); + }).catch(reject); }); } @@ -526,16 +427,14 @@ class RESTMethods { getGuildInvites(guild) { return new Promise((resolve, reject) => { - this.rest.makeRequest('get', Constants.Endpoints.guildInvites(guild.id), true) - .then(inviteItems => { - const invites = new Collection(); - for (const inviteItem of inviteItems) { - const invite = new Invite(this.rest.client, inviteItem); - invites.set(invite.code, invite); - } - resolve(invites); - }) - .catch(reject); + this.rest.makeRequest('get', Constants.Endpoints.guildInvites(guild.id), true).then(inviteItems => { + const invites = new Collection(); + for (const inviteItem of inviteItems) { + const invite = new Invite(this.rest.client, inviteItem); + invites.set(invite.code, invite); + } + resolve(invites); + }).catch(reject); }); } } diff --git a/src/client/rest/RequestHandlers/RequestHandler.js b/src/client/rest/RequestHandlers/RequestHandler.js index 0a7d3e53f..a1a2f3475 100644 --- a/src/client/rest/RequestHandlers/RequestHandler.js +++ b/src/client/rest/RequestHandlers/RequestHandler.js @@ -3,6 +3,9 @@ * @private */ class RequestHandler { + /** + * @param {RESTManager} restManager The REST manager to use + */ constructor(restManager) { /** * The RESTManager that instantiated this RequestHandler @@ -12,7 +15,7 @@ class RequestHandler { /** * A list of requests that have yet to be processed. - * @type {Array} + * @type {APIRequest[]} */ this.queue = []; } @@ -31,7 +34,7 @@ class RequestHandler { /** * Push a new API request into this bucket - * @param {APIRequest} request the new request to push into the queue + * @param {APIRequest} request The new request to push into the queue */ push(request) { this.queue.push(request); diff --git a/src/client/rest/RequestHandlers/Sequential.js b/src/client/rest/RequestHandlers/Sequential.js index 613ccf148..c971c198f 100644 --- a/src/client/rest/RequestHandlers/Sequential.js +++ b/src/client/rest/RequestHandlers/Sequential.js @@ -8,7 +8,10 @@ const RequestHandler = require('./RequestHandler'); * @private */ class SequentialRequestHandler extends RequestHandler { - + /** + * @param {RESTManager} restManager The REST manager to use + * @param {string} endpoint The endpoint to handle + */ constructor(restManager, endpoint) { super(restManager, endpoint); @@ -39,8 +42,8 @@ class SequentialRequestHandler extends RequestHandler { /** * Performs a request then resolves a promise to indicate its readiness for a new request - * @param {APIRequest} item the item to execute - * @returns {Promise} + * @param {APIRequest} item The item to execute + * @returns {Promise} */ execute(item) { return new Promise(resolve => { @@ -88,9 +91,8 @@ class SequentialRequestHandler extends RequestHandler { handle() { super.handle(); - if (this.waiting || this.queue.length === 0 || this.globalLimit) { - return; - } + + if (this.waiting || this.queue.length === 0 || this.globalLimit) return; this.waiting = true; const item = this.queue[0]; diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index 3120c4e0a..0b119914b 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -33,9 +33,7 @@ class ClientVoiceManager { */ _checkPendingReady(guildID) { const pendingRequest = this.pending.get(guildID); - if (!pendingRequest) { - throw new Error('Guild not pending'); - } + if (!pendingRequest) throw new Error('Guild not pending'); if (pendingRequest.token && pendingRequest.sessionID && pendingRequest.endpoint) { const { channel, token, sessionID, endpoint, resolve, reject } = pendingRequest; const voiceConnection = new VoiceConnection(this, channel, token, sessionID, endpoint, resolve, reject); @@ -49,15 +47,13 @@ class ClientVoiceManager { /** * Called when the Client receives information about this voice server update. - * @param {string} guildID the ID of the Guild - * @param {string} token the token to authorise with - * @param {string} endpoint the endpoint to connect to + * @param {string} guildID The ID of the Guild + * @param {string} token The token to authorise with + * @param {string} endpoint The endpoint to connect to */ _receivedVoiceServer(guildID, token, endpoint) { const pendingRequest = this.pending.get(guildID); - if (!pendingRequest) { - throw new Error('Guild not pending'); - } + if (!pendingRequest) throw new Error('Guild not pending'); pendingRequest.token = token; // remove the port otherwise it errors ¯\_(ツ)_/¯ pendingRequest.endpoint = endpoint.match(/([^:]*)/)[0]; @@ -66,22 +62,20 @@ class ClientVoiceManager { /** * Called when the Client receives information about the voice state update. - * @param {string} guildID the ID of the Guild - * @param {string} sessionID the session id to authorise with + * @param {string} guildID The ID of the Guild + * @param {string} sessionID The session id to authorise with */ _receivedVoiceStateUpdate(guildID, sessionID) { const pendingRequest = this.pending.get(guildID); - if (!pendingRequest) { - throw new Error('Guild not pending'); - } + if (!pendingRequest) throw new Error('Guild not pending'); pendingRequest.sessionID = sessionID; this._checkPendingReady(guildID); } /** * Sends a request to the main gateway to join a voice channel - * @param {VoiceChannel} channel the channel to join - * @param {Object} [options] the options to provide + * @param {VoiceChannel} channel The channel to join + * @param {Object} [options] The options to provide */ _sendWSJoin(channel, options = {}) { options = mergeDefault({ @@ -98,14 +92,12 @@ class ClientVoiceManager { /** * Sets up a request to join a voice channel - * @param {VoiceChannel} channel the voice channel to join + * @param {VoiceChannel} channel The voice channel to join * @returns {Promise} */ joinChannel(channel) { return new Promise((resolve, reject) => { - if (this.pending.get(channel.guild.id)) { - throw new Error('already connecting to a channel in this guild'); - } + if (this.pending.get(channel.guild.id)) throw new Error('already connecting to a channel in this guild'); const existingConn = this.connections.get(channel.guild.id); if (existingConn) { if (existingConn.channel.id !== channel.id) { diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index b14f68bba..d719b4560 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -71,14 +71,14 @@ class VoiceConnection extends EventEmitter { /** * Executed whenever an error occurs with the UDP/WebSocket sub-client * @private - * @param {Error} err The error that occurred + * @param {Error} err The encountered error */ _onError(err) { this._reject(err); /** * Emitted whenever the connection encounters a fatal error. * @event VoiceConnection#error - * @param {Error} error the encountered error + * @param {Error} error The encountered error */ this.emit('error', err); this._shutdown(err); @@ -86,7 +86,7 @@ class VoiceConnection extends EventEmitter { /** * Disconnects the Client from the Voice Channel - * @param {string} [reason='user requested'] the reason of the disconnection + * @param {string} [reason='user requested'] The reason of the disconnection */ disconnect(reason = 'user requested') { this.manager.client.ws.send({ @@ -107,19 +107,15 @@ class VoiceConnection extends EventEmitter { } _shutdown(e) { - if (!this.ready) { - return; - } + if (!this.ready) return; this.ready = false; this.websocket._shutdown(); this.player._shutdown(); - if (this.udp) { - this.udp._shutdown(); - } + if (this.udp) this.udp._shutdown(); /** * Emit once the voice connection has disconnected. * @event VoiceConnection#disconnected - * @param {Error} error the error, if any + * @param {Error} error The encountered error, if any */ this.emit('disconnected', e); } @@ -149,9 +145,7 @@ class VoiceConnection extends EventEmitter { }); this.once('ready', () => { setImmediate(() => { - for (const item of this.queue) { - this.emit(...item); - } + for (const item of this.queue) this.emit(...item); this.queue = []; }); }); @@ -197,21 +191,18 @@ class VoiceConnection extends EventEmitter { /** * Emitted whenever a user starts/stops speaking * @event VoiceConnection#speaking - * @param {User} user the user that has started/stopped speaking - * @param {boolean} speaking whether or not the user is speaking + * @param {User} user The user that has started/stopped speaking + * @param {boolean} speaking Whether or not the user is speaking */ - if (this.ready) { - this.emit('speaking', user, data.speaking); - } else { - this.queue.push(['speaking', user, data.speaking]); - } + if (this.ready) this.emit('speaking', user, data.speaking); + else this.queue.push(['speaking', user, data.speaking]); guild._memberSpeakUpdate(data.user_id, data.speaking); }); } /** * Play the given file in the voice connection - * @param {string} file the path to the file + * @param {string} file The path to the file * @returns {StreamDispatcher} * @example * // play files natively @@ -227,7 +218,7 @@ class VoiceConnection extends EventEmitter { /** * Plays and converts an audio stream in the voice connection - * @param {ReadableStream} stream the audio stream to play + * @param {ReadableStream} stream The audio stream to play * @returns {StreamDispatcher} * @example * // play streams using ytdl-core @@ -245,7 +236,7 @@ class VoiceConnection extends EventEmitter { /** * Plays a stream of 16-bit signed stereo PCM at 48KHz. - * @param {ReadableStream} stream the audio stream to play. + * @param {ReadableStream} stream The audio stream to play. * @returns {StreamDispatcher} */ playConvertedStream(stream) { diff --git a/src/client/voice/VoiceConnectionUDPClient.js b/src/client/voice/VoiceConnectionUDPClient.js index 7bd058a02..add7b9c4f 100644 --- a/src/client/voice/VoiceConnectionUDPClient.js +++ b/src/client/voice/VoiceConnectionUDPClient.js @@ -4,7 +4,6 @@ const Constants = require('../../util/Constants'); const EventEmitter = require('events').EventEmitter; class VoiceConnectionUDPClient extends EventEmitter { - constructor(voiceConnection, data) { super(); this.voiceConnection = voiceConnection; @@ -38,9 +37,7 @@ class VoiceConnectionUDPClient extends EventEmitter { try { this.udpSocket.close(); } catch (err) { - if (err.message !== 'Not running') { - this.emit('error', err); - } + if (err.message !== 'Not running') this.emit('error', err); } this.udpSocket = null; } @@ -55,10 +52,7 @@ class VoiceConnectionUDPClient extends EventEmitter { this.udpSocket.once('message', message => { const packet = new Buffer(message); this.localIP = ''; - for (let i = 4; i < packet.indexOf(0, i); i++) { - this.localIP += String.fromCharCode(packet[i]); - } - + for (let i = 4; i < packet.indexOf(0, i); i++) this.localIP += String.fromCharCode(packet[i]); this.localPort = parseInt(packet.readUIntLE(packet.length - 2, 2).toString(10), 10); this.voiceConnection.websocket.send({ @@ -77,7 +71,6 @@ class VoiceConnectionUDPClient extends EventEmitter { this.udpSocket.on('error', (error, message) => { this.emit('error', { error, message }); }); - this.udpSocket.on('close', error => { this.emit('close', error); }); @@ -86,7 +79,6 @@ class VoiceConnectionUDPClient extends EventEmitter { blankMessage.writeUIntBE(this.data.ssrc, 0, 4); this.send(blankMessage); } - } module.exports = VoiceConnectionUDPClient; diff --git a/src/client/voice/VoiceConnectionWebSocket.js b/src/client/voice/VoiceConnectionWebSocket.js index 6e47b1bfc..1c4543eed 100644 --- a/src/client/voice/VoiceConnectionWebSocket.js +++ b/src/client/voice/VoiceConnectionWebSocket.js @@ -26,15 +26,11 @@ class VoiceConnectionWebSocket extends EventEmitter { } send(data) { - if (this.ws.readyState === WebSocket.OPEN) { - this.ws.send(JSON.stringify(data)); - } + if (this.ws.readyState === WebSocket.OPEN) this.ws.send(JSON.stringify(data)); } _shutdown() { - if (this.ws) { - this.ws.close(); - } + if (this.ws) this.ws.close(); clearInterval(this.heartbeat); } @@ -97,9 +93,7 @@ class VoiceConnectionWebSocket extends EventEmitter { case Constants.VoiceOPCodes.SESSION_DESCRIPTION: this.encryptionMode = packet.d.mode; this.secretKey = new Uint8Array(new ArrayBuffer(packet.d.secret_key.length)); - for (const index in packet.d.secret_key) { - this.secretKey[index] = packet.d.secret_key[index]; - } + for (const index in packet.d.secret_key) this.secretKey[index] = packet.d.secret_key[index]; this.emit('ready', this.secretKey); break; case Constants.VoiceOPCodes.SPEAKING: diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 2408c235c..8088017f1 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -34,10 +34,10 @@ class StreamDispatcher extends EventEmitter { } /** - * Emitted when the dispatcher starts/stops speaking - * @event StreamDispatcher#speaking - * @param {boolean} value whether or not the dispatcher is speaking - */ + * Emitted when the dispatcher starts/stops speaking + * @event StreamDispatcher#speaking + * @param {boolean} value Whether or not the dispatcher is speaking + */ _setSpeaking(value) { this.speaking = value; this.emit('speaking', value); @@ -62,27 +62,18 @@ class StreamDispatcher extends EventEmitter { packetBuffer.copy(nonce, 0, 0, 12); buffer = NaCl.secretbox(buffer, nonce, this.player.connection.data.secret); - for (let i = 0; i < buffer.length; i++) { - packetBuffer[i + 12] = buffer[i]; - } + for (let i = 0; i < buffer.length; i++) packetBuffer[i + 12] = buffer[i]; return packetBuffer; } _applyVolume(buffer) { - if (this._volume === 1) { - return buffer; - } + if (this._volume === 1) return buffer; const out = new Buffer(buffer.length); - for (let i = 0; i < buffer.length; i += 2) { - if (i >= buffer.length - 1) { - break; - } - + if (i >= buffer.length - 1) break; const uint = Math.min(32767, Math.max(-32767, Math.floor(this._volume * buffer.readInt16LE(i)))); - out.writeInt16LE(uint, i); } @@ -95,20 +86,24 @@ class StreamDispatcher extends EventEmitter { this._setSpeaking(false); return; } + const data = this.streamingData; + if (data.missed >= 5) { this._triggerTerminalState('error', new Error('stream is not generating fast enough')); return; } + if (this.paused) { data.timestamp = data.timestamp + 4294967295 ? data.timestamp + 960 : 0; this.player.connection.manager.client.setTimeout(() => this._send(), data.length * 10); return; } - const bufferLength = 1920 * data.channels; - this._setSpeaking(true); - let buffer = this.stream.read(bufferLength); + this._setSpeaking(true); + + const bufferLength = 1920 * data.channels; + let buffer = this.stream.read(bufferLength); if (!buffer) { data.missed++; this.player.connection.manager.client.setTimeout(() => this._send(), data.length * 10); @@ -132,7 +127,6 @@ class StreamDispatcher extends EventEmitter { this._sendBuffer(buffer, data.sequence, data.timestamp); const nextTime = data.startTime + (data.count * data.length); - this.player.connection.manager.client.setTimeout(() => this._send(), data.length + (nextTime - Date.now())); } catch (e) { this._triggerTerminalState('error', e); @@ -140,33 +134,31 @@ class StreamDispatcher extends EventEmitter { } /** - * Emitted once the stream has ended. Attach a `once` listener to this. - * @event StreamDispatcher#end - */ + * Emitted once the stream has ended. Attach a `once` listener to this. + * @event StreamDispatcher#end + */ _triggerEnd() { this.emit('end'); } /** - * Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`. - * @event StreamDispatcher#error - * @param {Error} err the error encountered - */ + * Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`. + * @event StreamDispatcher#error + * @param {Error} err The encountered error + */ _triggerError(err) { this.emit('end'); this.emit('error', err); } _triggerTerminalState(state, err) { - if (this._triggered) { - return; - } + if (this._triggered) return; /** - * Emitted when the stream wants to give debug information. - * @event StreamDispatcher#debug - * @param {string} information the debug information - */ + * Emitted when the stream wants to give debug information. + * @event StreamDispatcher#debug + * @param {string} information The debug information + */ this.emit('debug', `triggered terminal state ${state} - stream is now dead`); this._triggered = true; this._setSpeaking(false); @@ -188,17 +180,20 @@ class StreamDispatcher extends EventEmitter { this.emit('error', 'no stream'); return; } + this.stream.on('end', err => this._triggerTerminalState('end', err)); this.stream.on('error', err => this._triggerTerminalState('error', err)); + const data = this.streamingData; data.length = 20; data.missed = 0; data.startTime = Date.now(); + this.stream.once('readable', () => this._send()); } - _pause(value) { - if (value) { + _setPaused(paused) { + if (paused) { this.paused = true; this._setSpeaking(false); } else { @@ -225,7 +220,7 @@ class StreamDispatcher extends EventEmitter { /** * Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double. - * @param {number} volume the volume that you want to set + * @param {number} volume The volume that you want to set */ setVolume(volume) { this._volume = volume; @@ -233,7 +228,7 @@ class StreamDispatcher extends EventEmitter { /** * Set the volume in decibels - * @param {number} db the decibels + * @param {number} db The decibels */ setVolumeDecibels(db) { this._volume = Math.pow(10, db / 20); @@ -241,7 +236,7 @@ class StreamDispatcher extends EventEmitter { /** * Set the volume so that a perceived value of 0.5 is half the perceived volume etc. - * @param {number} value the value for the volume + * @param {number} value The value for the volume */ setVolumeLogarithmic(value) { this._volume = Math.pow(value, 1.660964); @@ -251,14 +246,14 @@ class StreamDispatcher extends EventEmitter { * Stops sending voice packets to the voice connection (stream may still progress however) */ pause() { - this._pause(true); + this._setPaused(true); } /** * Resumes sending voice packets to the voice connection (may be further on in the stream than when paused) */ resume() { - this._pause(false); + this._setPaused(false); } } diff --git a/src/client/voice/opus/NodeOpusEngine.js b/src/client/voice/opus/NodeOpusEngine.js index 52d1d7b0e..10f287b9d 100644 --- a/src/client/voice/opus/NodeOpusEngine.js +++ b/src/client/voice/opus/NodeOpusEngine.js @@ -6,7 +6,6 @@ class NodeOpusEngine extends OpusEngine { constructor(player) { super(player); try { - // eslint-disable-next-line import/no-unresolved opus = require('node-opus'); } catch (err) { throw err; diff --git a/src/client/voice/opus/OpusEngineList.js b/src/client/voice/opus/OpusEngineList.js index 89b9aa07a..a7f225f22 100644 --- a/src/client/voice/opus/OpusEngineList.js +++ b/src/client/voice/opus/OpusEngineList.js @@ -3,10 +3,6 @@ const list = [ require('./OpusScriptEngine'), ]; -exports.add = encoder => { - list.push(encoder); -}; - function fetch(Encoder) { try { return new Encoder(); @@ -15,12 +11,14 @@ function fetch(Encoder) { } } +exports.add = encoder => { + list.push(encoder); +}; + exports.fetch = () => { for (const encoder of list) { - const success = fetch(encoder); - if (success) { - return success; - } + const fetched = fetch(encoder); + if (fetched) return fetched; } throw new Error('could not find an opus engine'); }; diff --git a/src/client/voice/opus/OpusScriptEngine.js b/src/client/voice/opus/OpusScriptEngine.js index 79df01163..33b4ff5a6 100644 --- a/src/client/voice/opus/OpusScriptEngine.js +++ b/src/client/voice/opus/OpusScriptEngine.js @@ -1,17 +1,16 @@ const OpusEngine = require('./BaseOpusEngine'); -let Opusscript; +let OpusScript; class NodeOpusEngine extends OpusEngine { constructor(player) { super(player); try { - // eslint-disable-next-line import/no-unresolved - Opusscript = require('opusscript'); + OpusScript = require('opusscript'); } catch (err) { throw err; } - this.encoder = new Opusscript(48000, 2); + this.encoder = new OpusScript(48000, 2); } encode(buffer) { diff --git a/src/client/voice/pcm/ConverterEngine.js b/src/client/voice/pcm/ConverterEngine.js index d8d2d424e..6b7502f90 100644 --- a/src/client/voice/pcm/ConverterEngine.js +++ b/src/client/voice/pcm/ConverterEngine.js @@ -1,7 +1,6 @@ const EventEmitter = require('events').EventEmitter; class ConverterEngine extends EventEmitter { - constructor(player) { super(); this.player = player; @@ -10,7 +9,6 @@ class ConverterEngine extends EventEmitter { createConvertStream() { return; } - } module.exports = ConverterEngine; diff --git a/src/client/voice/pcm/FfmpegConverterEngine.js b/src/client/voice/pcm/FfmpegConverterEngine.js index b5dd7e389..64dca3692 100644 --- a/src/client/voice/pcm/FfmpegConverterEngine.js +++ b/src/client/voice/pcm/FfmpegConverterEngine.js @@ -1,15 +1,6 @@ const ConverterEngine = require('./ConverterEngine'); const ChildProcess = require('child_process'); -function chooseCommand() { - for (const cmd of ['ffmpeg', 'avconv', './ffmpeg', './avconv']) { - if (!ChildProcess.spawnSync(cmd, ['-h']).error) { - return cmd; - } - } - return null; -} - class FfmpegConverterEngine extends ConverterEngine { constructor(player) { super(player); @@ -17,9 +8,7 @@ class FfmpegConverterEngine extends ConverterEngine { } handleError(encoder, err) { - if (encoder.destroy) { - encoder.destroy(); - } + if (encoder.destroy) encoder.destroy(); this.emit('error', err); } @@ -41,4 +30,11 @@ class FfmpegConverterEngine extends ConverterEngine { } } +function chooseCommand() { + for (const cmd of ['ffmpeg', 'avconv', './ffmpeg', './avconv']) { + if (!ChildProcess.spawnSync(cmd, ['-h']).error) return cmd; + } + return null; +} + module.exports = FfmpegConverterEngine; diff --git a/src/client/voice/player/BasePlayer.js b/src/client/voice/player/BasePlayer.js index aa0a35dca..e41048d0a 100644 --- a/src/client/voice/player/BasePlayer.js +++ b/src/client/voice/player/BasePlayer.js @@ -5,7 +5,6 @@ const StreamDispatcher = require('../dispatcher/StreamDispatcher'); const EventEmitter = require('events').EventEmitter; class VoiceConnectionPlayer extends EventEmitter { - constructor(connection) { super(); this.connection = connection; @@ -38,9 +37,7 @@ class VoiceConnectionPlayer extends EventEmitter { _shutdown() { this.speaking = false; - for (const stream of this.processMap.keys()) { - this.killStream(stream); - } + for (const stream of this.processMap.keys()) this.killStream(stream); } killStream(stream) { @@ -79,9 +76,7 @@ class VoiceConnectionPlayer extends EventEmitter { } setSpeaking(value) { - if (this.speaking === value) { - return; - } + if (this.speaking === value) return; this.speaking = value; this.connection.websocket.send({ op: Constants.VoiceOPCodes.SPEAKING, @@ -100,7 +95,6 @@ class VoiceConnectionPlayer extends EventEmitter { this.dispatcher = dispatcher; return dispatcher; } - } module.exports = VoiceConnectionPlayer; diff --git a/src/client/voice/player/DefaultPlayer.js b/src/client/voice/player/DefaultPlayer.js index 383e0668b..bd3b688bc 100644 --- a/src/client/voice/player/DefaultPlayer.js +++ b/src/client/voice/player/DefaultPlayer.js @@ -2,7 +2,6 @@ const BasePlayer = require('./BasePlayer'); const fs = require('fs'); class DefaultPlayer extends BasePlayer { - playFile(file) { return this.playStream(fs.createReadStream(file)); } diff --git a/src/client/voice/receiver/VoiceReadable.js b/src/client/voice/receiver/VoiceReadable.js index f68b7f458..50ace27ae 100644 --- a/src/client/voice/receiver/VoiceReadable.js +++ b/src/client/voice/receiver/VoiceReadable.js @@ -11,10 +11,8 @@ class VoiceReadable extends Readable { return; } - $push(d) { - if (this.open) { - this.push(d); - } + _push(d) { + if (this.open) this.push(d); } } diff --git a/src/client/voice/receiver/VoiceReceiver.js b/src/client/voice/receiver/VoiceReceiver.js index 6862378f8..f28fbe463 100644 --- a/src/client/voice/receiver/VoiceReceiver.js +++ b/src/client/voice/receiver/VoiceReceiver.js @@ -53,7 +53,7 @@ class VoiceReceiver extends EventEmitter { /** * Creates a readable stream for a user that provides opus data while the user is speaking. When the user * stops speaking, the stream is destroyed. - * @param {UserResolvable} user the user to create the stream for + * @param {UserResolvable} user The user to create the stream for * @returns {ReadableStream} */ createOpusStream(user) { @@ -72,17 +72,13 @@ class VoiceReceiver extends EventEmitter { /** * Creates a readable stream for a user that provides PCM data while the user is speaking. When the user * stops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz. - * @param {UserResolvable} user the user to create the stream for + * @param {UserResolvable} user The user to create the stream for * @returns {ReadableStream} */ createPCMStream(user) { user = this.connection.manager.client.resolver.resolveUser(user); - if (!user) { - throw new Error('invalid user object supplied'); - } - if (this.pcmStreams.get(user.id)) { - throw new Error('there is already an existing stream for that user!'); - } + if (!user) throw new Error('invalid user object supplied'); + if (this.pcmStreams.get(user.id)) throw new Error('there is already an existing stream for that user!'); const stream = new Readable(); this.pcmStreams.set(user.id, stream); return stream; @@ -95,34 +91,30 @@ class VoiceReceiver extends EventEmitter { /** * Emitted whenever a voice packet cannot be decrypted * @event VoiceReceiver#warn - * @param {string} message the warning message + * @param {string} message The warning message */ this.emit('warn', 'failed to decrypt voice packet'); return; } data = new Buffer(data); - /** - * Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM). - * @event VoiceReceiver#opus - * @param {User} user the user that is sending the buffer (is speaking) - * @param {Buffer} buffer the opus buffer - */ - if (this.opusStreams.get(user.id)) { - this.opusStreams.get(user.id).$push(data); - } + if (this.opusStreams.get(user.id)) this.opusStreams.get(user.id)._push(data); + /** + * Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM). + * @event VoiceReceiver#opus + * @param {User} user The user that is sending the buffer (is speaking) + * @param {Buffer} buffer The opus buffer + */ this.emit('opus', user, data); if (this.listenerCount('pcm') > 0 || this.pcmStreams.size > 0) { /** - * Emits decoded voice data when it's received. For performance reasons, the decoding will only - * happen if there is at least one `pcm` listener on this receiver. - * @event VoiceReceiver#pcm - * @param {User} user the user that is sending the buffer (is speaking) - * @param {Buffer} buffer the decoded buffer - */ + * Emits decoded voice data when it's received. For performance reasons, the decoding will only + * happen if there is at least one `pcm` listener on this receiver. + * @event VoiceReceiver#pcm + * @param {User} user The user that is sending the buffer (is speaking) + * @param {Buffer} buffer The decoded buffer + */ const pcm = this.connection.player.opusEncoder.decode(data); - if (this.pcmStreams.get(user.id)) { - this.pcmStreams.get(user.id).$push(pcm); - } + if (this.pcmStreams.get(user.id)) this.pcmStreams.get(user.id)._push(pcm); this.emit('pcm', user, pcm); } } diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 22e84da56..7bdf08294 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -8,14 +8,12 @@ const PacketManager = require('./packets/WebSocketPacketManager'); * @private */ class WebSocketManager { - constructor(client) { /** * The Client that instantiated this WebSocketManager * @type {Client} */ this.client = client; - this.ws = null; /** * A WebSocket Packet manager, it handles all the messages * @type {PacketManager} @@ -26,43 +24,40 @@ class WebSocketManager { * @type {number} */ this.status = Constants.Status.IDLE; - /** * The session ID of the connection, null if not yet available. * @type {?string} */ this.sessionID = null; - /** * The packet count of the client, null if not yet available. * @type {?number} */ this.sequence = -1; - /** * The gateway address for this WebSocket connection, null if not yet available. * @type {?string} */ this.gateway = null; - /** * Whether READY was emitted normally (all packets received) or not * @type {boolean} */ this.normalReady = false; - } - - /** - * Connects the client to a given gateway - * @param {string} gateway the gateway to connect to - */ - connect(gateway) { - this.normalReady = false; - this.status = Constants.Status.CONNECTING; /** * The WebSocket connection to the gateway * @type {?WebSocket} */ + this.ws = null; + } + + /** + * Connects the client to a given gateway + * @param {string} gateway The gateway to connect to + */ + connect(gateway) { + this.normalReady = false; + this.status = Constants.Status.CONNECTING; this.ws = new WebSocket(gateway); this.ws.onopen = () => this.eventOpen(); this.ws.onclose = (d) => this.eventClose(d); @@ -113,15 +108,12 @@ class WebSocketManager { * Run whenever the gateway connections opens up */ eventOpen() { - if (this.reconnecting) { - this._sendResume(); - } else { - this._sendNewIdentify(); - } + if (this.reconnecting) this._sendResume(); + else this._sendNewIdentify(); } /** - * Sends a gatway resume packet, in cases of unexpected disconnections. + * Sends a gateway resume packet, in cases of unexpected disconnections. */ _sendResume() { const payload = { @@ -155,30 +147,23 @@ class WebSocketManager { /** * Run whenever the connection to the gateway is closed, it will try to reconnect the client. - * @param {Object} event the event + * @param {Object} event The received websocket data */ eventClose(event) { - if (event.code === 4004) { - throw Constants.Errors.BAD_LOGIN; - } - if (!this.reconnecting && event.code !== 1000) { - this.tryReconnect(); - } + if (event.code === 4004) throw Constants.Errors.BAD_LOGIN; + if (!this.reconnecting && event.code !== 1000) this.tryReconnect(); } /** * Run whenever a message is received from the WebSocket. Returns `true` if the message * was handled properly. - * @param {Object} event the received websocket data + * @param {Object} event The received websocket data * @returns {boolean} */ eventMessage(event) { let packet; try { - if (event.binary) { - event.data = zlib.inflateSync(event.data).toString(); - } - + if (event.binary) event.data = zlib.inflateSync(event.data).toString(); packet = JSON.parse(event.data); } catch (e) { return this.eventError(Constants.Errors.BAD_WS_MESSAGE); @@ -186,22 +171,19 @@ class WebSocketManager { this.client.emit('raw', packet); - if (packet.op === 10) { - this.client.manager.setupKeepAlive(packet.d.heartbeat_interval); - } - + if (packet.op === 10) this.client.manager.setupKeepAlive(packet.d.heartbeat_interval); return this.packetManager.handle(packet); } /** * Run whenever an error occurs with the WebSocket connection. Tries to reconnect - * @param {Error} err the error that occurred + * @param {Error} err The encountered error */ eventError(err) { /** * Emitted whenever the Client encounters a serious connection error * @event Client#error - * @param {Error} error the encountered error + * @param {Error} error The encountered error */ this.client.emit('error', err); this.tryReconnect(); @@ -210,7 +192,6 @@ class WebSocketManager { _emitReady(normal = true) { /** * Emitted when the Client becomes ready to start working - * * @event Client#ready */ this.status = Constants.Status.READY; @@ -252,10 +233,9 @@ class WebSocketManager { this.ws.close(); this.packetManager.handleQueue(); /** - * Emitted when the Client tries to reconnect after being disconnected - * - * @event Client#reconnecting - */ + * Emitted when the Client tries to reconnect after being disconnected + * @event Client#reconnecting + */ this.client.emit(Constants.Events.RECONNECTING); this.connect(this.client.ws.gateway); } diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 2aeb1d531..bf81fd538 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -10,7 +10,6 @@ const BeforeReadyWhitelist = [ ]; class WebSocketPacketManager { - constructor(websocketManager) { this.ws = websocketManager; this.handlers = {}; @@ -62,9 +61,7 @@ class WebSocketPacketManager { } setSequence(s) { - if (s && s > this.ws.sequence) { - this.ws.sequence = s; - } + if (s && s > this.ws.sequence) this.ws.sequence = s; } handle(packet) { @@ -93,13 +90,9 @@ class WebSocketPacketManager { } } - if (this.handlers[packet.t]) { - return this.handlers[packet.t].handle(packet); - } - + if (this.handlers[packet.t]) return this.handlers[packet.t].handle(packet); return false; } - } module.exports = WebSocketPacketManager; diff --git a/src/client/websocket/packets/handlers/AbstractHandler.js b/src/client/websocket/packets/handlers/AbstractHandler.js index ec744c487..c1c2a5a2d 100644 --- a/src/client/websocket/packets/handlers/AbstractHandler.js +++ b/src/client/websocket/packets/handlers/AbstractHandler.js @@ -1,5 +1,4 @@ class AbstractHandler { - constructor(packetManager) { this.packetManager = packetManager; } diff --git a/src/client/websocket/packets/handlers/ChannelCreate.js b/src/client/websocket/packets/handlers/ChannelCreate.js index e4c36db14..166371642 100644 --- a/src/client/websocket/packets/handlers/ChannelCreate.js +++ b/src/client/websocket/packets/handlers/ChannelCreate.js @@ -3,25 +3,18 @@ const AbstractHandler = require('./AbstractHandler'); const Constants = require('../../../../util/Constants'); class ChannelCreateHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; const response = client.actions.ChannelCreate.handle(data); - - if (response.channel) { - client.emit(Constants.Events.CHANNEL_CREATE, response.channel); - } + if (response.channel) client.emit(Constants.Events.CHANNEL_CREATE, response.channel); } - } /** -* Emitted whenever a Channel is created. -* -* @event Client#channelCreate -* @param {Channel} channel The channel that was created -*/ + * Emitted whenever a Channel is created. + * @event Client#channelCreate + * @param {Channel} channel The channel that was created + */ module.exports = ChannelCreateHandler; diff --git a/src/client/websocket/packets/handlers/ChannelDelete.js b/src/client/websocket/packets/handlers/ChannelDelete.js index b93ca51c1..ec49df0d5 100644 --- a/src/client/websocket/packets/handlers/ChannelDelete.js +++ b/src/client/websocket/packets/handlers/ChannelDelete.js @@ -3,25 +3,18 @@ const AbstractHandler = require('./AbstractHandler'); const Constants = require('../../../../util/Constants'); class ChannelDeleteHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; const response = client.actions.ChannelDelete.handle(data); - - if (response.channel) { - client.emit(Constants.Events.CHANNEL_DELETE, response.channel); - } + if (response.channel) client.emit(Constants.Events.CHANNEL_DELETE, response.channel); } - } /** -* Emitted whenever a Channel is deleted. -* -* @event Client#channelDelete -* @param {Channel} channel The channel that was deleted -*/ + * Emitted whenever a Channel is deleted. + * @event Client#channelDelete + * @param {Channel} channel The channel that was deleted + */ module.exports = ChannelDeleteHandler; diff --git a/src/client/websocket/packets/handlers/ChannelPinsUpdate.js b/src/client/websocket/packets/handlers/ChannelPinsUpdate.js index c597a04fa..65d862959 100644 --- a/src/client/websocket/packets/handlers/ChannelPinsUpdate.js +++ b/src/client/websocket/packets/handlers/ChannelPinsUpdate.js @@ -8,31 +8,24 @@ const Constants = require('../../../../util/Constants'); d: { last_pin_timestamp: '2016-08-28T17:37:13.171774+00:00', channel_id: '314866471639044027' } } - */ +*/ class ChannelPinsUpdate extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; const channel = client.channels.get(data.channel_id); const time = new Date(data.last_pin_timestamp); - - if (channel && time) { - client.emit(Constants.Events.CHANNEL_PINS_UPDATE, channel, time); - } + if (channel && time) client.emit(Constants.Events.CHANNEL_PINS_UPDATE, channel, time); } - } /** -* Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information -* can be provided easily here - you need to manually check the pins yourself. -* -* @event Client#channelPinsUpdate -* @param {Channel} channel The channel that the pins update occured in -* @param {Date} time the time of the pins update -*/ + * Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information + * can be provided easily here - you need to manually check the pins yourself. + * @event Client#channelPinsUpdate + * @param {Channel} channel The channel that the pins update occured in + * @param {Date} time The time of the pins update + */ module.exports = ChannelPinsUpdate; diff --git a/src/client/websocket/packets/handlers/ChannelUpdate.js b/src/client/websocket/packets/handlers/ChannelUpdate.js index 070cdcd24..fa535b143 100644 --- a/src/client/websocket/packets/handlers/ChannelUpdate.js +++ b/src/client/websocket/packets/handlers/ChannelUpdate.js @@ -1,14 +1,11 @@ const AbstractHandler = require('./AbstractHandler'); class ChannelUpdateHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; client.actions.ChannelUpdate.handle(data); } - } module.exports = ChannelUpdateHandler; diff --git a/src/client/websocket/packets/handlers/GuildBanAdd.js b/src/client/websocket/packets/handlers/GuildBanAdd.js index 400651f75..60ce72d0a 100644 --- a/src/client/websocket/packets/handlers/GuildBanAdd.js +++ b/src/client/websocket/packets/handlers/GuildBanAdd.js @@ -4,27 +4,20 @@ const AbstractHandler = require('./AbstractHandler'); const Constants = require('../../../../util/Constants'); class GuildBanAddHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; const guild = client.guilds.get(data.guild_id); const user = client.users.get(data.user.id); - - if (guild && user) { - client.emit(Constants.Events.GUILD_BAN_ADD, guild, user); - } + if (guild && user) client.emit(Constants.Events.GUILD_BAN_ADD, guild, user); } - } /** -* Emitted whenever a member is banned from a guild. -* -* @event Client#guildBanAdd -* @param {Guild} guild The guild that the ban occurred in -* @param {User} user The user that was banned -*/ + * Emitted whenever a member is banned from a guild. + * @event Client#guildBanAdd + * @param {Guild} guild The guild that the ban occurred in + * @param {User} user The user that was banned + */ module.exports = GuildBanAddHandler; diff --git a/src/client/websocket/packets/handlers/GuildBanRemove.js b/src/client/websocket/packets/handlers/GuildBanRemove.js index 18aba54b4..c4edbdeb6 100644 --- a/src/client/websocket/packets/handlers/GuildBanRemove.js +++ b/src/client/websocket/packets/handlers/GuildBanRemove.js @@ -3,22 +3,18 @@ const AbstractHandler = require('./AbstractHandler'); class GuildBanRemoveHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; client.actions.GuildBanRemove.handle(data); } - } /** -* Emitted whenever a member is unbanned from a guild. -* -* @event Client#guildBanRemove -* @param {Guild} guild The guild that the unban occurred in -* @param {User} user The user that was unbanned -*/ + * Emitted whenever a member is unbanned from a guild. + * @event Client#guildBanRemove + * @param {Guild} guild The guild that the unban occurred in + * @param {User} user The user that was unbanned + */ module.exports = GuildBanRemoveHandler; diff --git a/src/client/websocket/packets/handlers/GuildCreate.js b/src/client/websocket/packets/handlers/GuildCreate.js index d3bac1c7e..c7fbd7e7c 100644 --- a/src/client/websocket/packets/handlers/GuildCreate.js +++ b/src/client/websocket/packets/handlers/GuildCreate.js @@ -1,13 +1,11 @@ const AbstractHandler = require('./AbstractHandler'); class GuildCreateHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; + const data = packet.d; const guild = client.guilds.get(data.id); - if (guild) { if (!guild.available && !data.unavailable) { // a newly available guild @@ -19,7 +17,6 @@ class GuildCreateHandler extends AbstractHandler { client.dataManager.newGuild(data); } } - } module.exports = GuildCreateHandler; diff --git a/src/client/websocket/packets/handlers/GuildDelete.js b/src/client/websocket/packets/handlers/GuildDelete.js index 237652d7f..9b74d56f6 100644 --- a/src/client/websocket/packets/handlers/GuildDelete.js +++ b/src/client/websocket/packets/handlers/GuildDelete.js @@ -2,25 +2,18 @@ const AbstractHandler = require('./AbstractHandler'); const Constants = require('../../../../util/Constants'); class GuildDeleteHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; const response = client.actions.GuildDelete.handle(data); - - if (response.guild) { - client.emit(Constants.Events.GUILD_DELETE, response.guild); - } + if (response.guild) client.emit(Constants.Events.GUILD_DELETE, response.guild); } - } /** -* Emitted whenever a Guild is deleted/left. -* -* @event Client#guildDelete -* @param {Guild} guild The guild that was deleted -*/ + * Emitted whenever a Guild is deleted/left. + * @event Client#guildDelete + * @param {Guild} guild The guild that was deleted + */ module.exports = GuildDeleteHandler; diff --git a/src/client/websocket/packets/handlers/GuildMemberAdd.js b/src/client/websocket/packets/handlers/GuildMemberAdd.js index cfdb6a263..d4d122f70 100644 --- a/src/client/websocket/packets/handlers/GuildMemberAdd.js +++ b/src/client/websocket/packets/handlers/GuildMemberAdd.js @@ -3,19 +3,15 @@ const AbstractHandler = require('./AbstractHandler'); class GuildMemberAddHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; const guild = client.guilds.get(data.guild_id); - if (guild) { guild.memberCount++; guild._addMember(data); } } - } module.exports = GuildMemberAddHandler; diff --git a/src/client/websocket/packets/handlers/GuildMemberRemove.js b/src/client/websocket/packets/handlers/GuildMemberRemove.js index 2f8571e58..6ec1bfe64 100644 --- a/src/client/websocket/packets/handlers/GuildMemberRemove.js +++ b/src/client/websocket/packets/handlers/GuildMemberRemove.js @@ -3,14 +3,11 @@ const AbstractHandler = require('./AbstractHandler'); class GuildMemberRemoveHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; client.actions.GuildMemberRemove.handle(data); } - } module.exports = GuildMemberRemoveHandler; diff --git a/src/client/websocket/packets/handlers/GuildMemberUpdate.js b/src/client/websocket/packets/handlers/GuildMemberUpdate.js index cca3422c0..94ac71f47 100644 --- a/src/client/websocket/packets/handlers/GuildMemberUpdate.js +++ b/src/client/websocket/packets/handlers/GuildMemberUpdate.js @@ -3,21 +3,16 @@ const AbstractHandler = require('./AbstractHandler'); class GuildMemberUpdateHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; + const data = packet.d; const guild = client.guilds.get(data.guild_id); - if (guild) { const member = guild.members.get(data.user.id); - if (member) { - guild._updateMember(member, data); - } + if (member) guild._updateMember(member, data); } } - } module.exports = GuildMemberUpdateHandler; diff --git a/src/client/websocket/packets/handlers/GuildMembersChunk.js b/src/client/websocket/packets/handlers/GuildMembersChunk.js index bca64ed99..532d73bed 100644 --- a/src/client/websocket/packets/handlers/GuildMembersChunk.js +++ b/src/client/websocket/packets/handlers/GuildMembersChunk.js @@ -4,31 +4,26 @@ const AbstractHandler = require('./AbstractHandler'); const Constants = require('../../../../util/Constants'); class GuildMembersChunkHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; + const data = packet.d; const guild = client.guilds.get(data.guild_id); const members = []; if (guild) { - for (const member of data.members) { - members.push(guild._addMember(member, true)); - } + for (const member of data.members) members.push(guild._addMember(member, true)); } guild._checkChunks(); client.emit(Constants.Events.GUILD_MEMBERS_CHUNK, guild, members); } - } /** -* Emitted whenever a chunk of Guild members is received -* -* @event Client#guildMembersChunk -* @param {Guild} guild The guild that the chunks relate to -* @param {Array} members The members in the chunk -*/ + * Emitted whenever a chunk of Guild members is received + * @event Client#guildMembersChunk + * @param {Guild} guild The guild that the chunks relate to + * @param {GuildMember[]} members The members in the chunk + */ module.exports = GuildMembersChunkHandler; diff --git a/src/client/websocket/packets/handlers/GuildRoleCreate.js b/src/client/websocket/packets/handlers/GuildRoleCreate.js index 6b791bfb3..8581d53f6 100644 --- a/src/client/websocket/packets/handlers/GuildRoleCreate.js +++ b/src/client/websocket/packets/handlers/GuildRoleCreate.js @@ -1,14 +1,11 @@ const AbstractHandler = require('./AbstractHandler'); class GuildRoleCreateHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; client.actions.GuildRoleCreate.handle(data); } - } module.exports = GuildRoleCreateHandler; diff --git a/src/client/websocket/packets/handlers/GuildRoleDelete.js b/src/client/websocket/packets/handlers/GuildRoleDelete.js index 17135e20a..63439b0fe 100644 --- a/src/client/websocket/packets/handlers/GuildRoleDelete.js +++ b/src/client/websocket/packets/handlers/GuildRoleDelete.js @@ -1,14 +1,11 @@ const AbstractHandler = require('./AbstractHandler'); class GuildRoleDeleteHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; client.actions.GuildRoleDelete.handle(data); } - } module.exports = GuildRoleDeleteHandler; diff --git a/src/client/websocket/packets/handlers/GuildRoleUpdate.js b/src/client/websocket/packets/handlers/GuildRoleUpdate.js index 8fea7271f..6fbdc109a 100644 --- a/src/client/websocket/packets/handlers/GuildRoleUpdate.js +++ b/src/client/websocket/packets/handlers/GuildRoleUpdate.js @@ -1,14 +1,11 @@ const AbstractHandler = require('./AbstractHandler'); class GuildRoleUpdateHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; client.actions.GuildRoleUpdate.handle(data); } - } module.exports = GuildRoleUpdateHandler; diff --git a/src/client/websocket/packets/handlers/GuildSync.js b/src/client/websocket/packets/handlers/GuildSync.js index 941ea9f15..0b9f5aa86 100644 --- a/src/client/websocket/packets/handlers/GuildSync.js +++ b/src/client/websocket/packets/handlers/GuildSync.js @@ -1,14 +1,11 @@ const AbstractHandler = require('./AbstractHandler'); class GuildSyncHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; client.actions.GuildSync.handle(data); } - } module.exports = GuildSyncHandler; diff --git a/src/client/websocket/packets/handlers/GuildUpdate.js b/src/client/websocket/packets/handlers/GuildUpdate.js index b022fb688..70eff52c4 100644 --- a/src/client/websocket/packets/handlers/GuildUpdate.js +++ b/src/client/websocket/packets/handlers/GuildUpdate.js @@ -1,14 +1,11 @@ const AbstractHandler = require('./AbstractHandler'); class GuildUpdateHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; client.actions.GuildUpdate.handle(data); } - } module.exports = GuildUpdateHandler; diff --git a/src/client/websocket/packets/handlers/MessageCreate.js b/src/client/websocket/packets/handlers/MessageCreate.js index 25de28166..058dc854e 100644 --- a/src/client/websocket/packets/handlers/MessageCreate.js +++ b/src/client/websocket/packets/handlers/MessageCreate.js @@ -2,25 +2,18 @@ const AbstractHandler = require('./AbstractHandler'); const Constants = require('../../../../util/Constants'); class MessageCreateHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; const response = client.actions.MessageCreate.handle(data); - - if (response.message) { - client.emit(Constants.Events.MESSAGE_CREATE, response.message); - } + if (response.message) client.emit(Constants.Events.MESSAGE_CREATE, response.message); } - } /** -* Emitted whenever a message is created -* -* @event Client#message -* @param {Message} message The created message -*/ + * Emitted whenever a message is created + * @event Client#message + * @param {Message} message The created message + */ module.exports = MessageCreateHandler; diff --git a/src/client/websocket/packets/handlers/MessageDelete.js b/src/client/websocket/packets/handlers/MessageDelete.js index 7acc80114..b06ce9887 100644 --- a/src/client/websocket/packets/handlers/MessageDelete.js +++ b/src/client/websocket/packets/handlers/MessageDelete.js @@ -2,25 +2,18 @@ const AbstractHandler = require('./AbstractHandler'); const Constants = require('../../../../util/Constants'); class MessageDeleteHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; const response = client.actions.MessageDelete.handle(data); - - if (response.message) { - client.emit(Constants.Events.MESSAGE_DELETE, response.message); - } + if (response.message) client.emit(Constants.Events.MESSAGE_DELETE, response.message); } - } /** -* Emitted whenever a message is deleted -* -* @event Client#messageDelete -* @param {Message} message The deleted message -*/ + * Emitted whenever a message is deleted + * @event Client#messageDelete + * @param {Message} message The deleted message + */ module.exports = MessageDeleteHandler; diff --git a/src/client/websocket/packets/handlers/MessageDeleteBulk.js b/src/client/websocket/packets/handlers/MessageDeleteBulk.js index b1da3b777..6cd36484e 100644 --- a/src/client/websocket/packets/handlers/MessageDeleteBulk.js +++ b/src/client/websocket/packets/handlers/MessageDeleteBulk.js @@ -1,21 +1,17 @@ const AbstractHandler = require('./AbstractHandler'); class MessageDeleteBulkHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; client.actions.MessageDeleteBulk.handle(data); } - } /** -* Emitted whenever a messages are deleted in bulk -* -* @event Client#messageDeleteBulk -* @param {Collection} messages The deleted messages, mapped by their ID -*/ + * Emitted whenever messages are deleted in bulk + * @event Client#messageDeleteBulk + * @param {Collection} messages The deleted messages, mapped by their ID + */ module.exports = MessageDeleteBulkHandler; diff --git a/src/client/websocket/packets/handlers/MessageUpdate.js b/src/client/websocket/packets/handlers/MessageUpdate.js index 56b8992b4..527632d4e 100644 --- a/src/client/websocket/packets/handlers/MessageUpdate.js +++ b/src/client/websocket/packets/handlers/MessageUpdate.js @@ -1,14 +1,11 @@ const AbstractHandler = require('./AbstractHandler'); class MessageUpdateHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; client.actions.MessageUpdate.handle(data); } - } module.exports = MessageUpdateHandler; diff --git a/src/client/websocket/packets/handlers/PresenceUpdate.js b/src/client/websocket/packets/handlers/PresenceUpdate.js index 98b22e2d0..3ba602cda 100644 --- a/src/client/websocket/packets/handlers/PresenceUpdate.js +++ b/src/client/websocket/packets/handlers/PresenceUpdate.js @@ -3,21 +3,16 @@ const Constants = require('../../../../util/Constants'); const cloneObject = require('../../../../util/CloneObject'); class PresenceUpdateHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; + const data = packet.d; let user = client.users.get(data.user.id); const guild = client.guilds.get(data.guild_id); - function makeUser(newUser) { - return client.dataManager.newUser(newUser); - } - // step 1 if (!user) { if (data.user.username) { - user = makeUser(data.user); + user = client.dataManager.newUser(data.user); } else { return; } @@ -39,7 +34,6 @@ class PresenceUpdateHandler extends AbstractHandler { data.user.username = data.user.username || user.username; data.user.id = data.user.id || user.id; data.user.discriminator = data.user.discriminator || user.discriminator; - // comment out avatar patching as it causes bugs (see #297) // data.user.avatar = data.user.avatar || user.avatar; data.user.status = data.status || user.status; @@ -58,24 +52,20 @@ class PresenceUpdateHandler extends AbstractHandler { client.emit(Constants.Events.PRESENCE_UPDATE, oldUser, user); } } - } /** -* Emitted whenever a user changes one of their details or starts/stop playing a game -* -* @event Client#presenceUpdate -* @param {User} oldUser the user before the presence update -* @param {User} newUser the user after the presence update -*/ + * Emitted whenever a user changes one of their details or starts/stop playing a game + * @event Client#presenceUpdate + * @param {User} oldUser The user before the presence update + * @param {User} newUser The user after the presence update + */ /** -* Emitted whenever a member becomes available in a large Guild -* -* @event Client#guildMemberAvailable -* @param {Guild} guild The guild that the member became available in -* @param {GuildMember} member the member that became available -*/ - + * Emitted whenever a member becomes available in a large Guild + * @event Client#guildMemberAvailable + * @param {Guild} guild The guild that the member became available in + * @param {GuildMember} member The member that became available + */ module.exports = PresenceUpdateHandler; diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index 1283d46b0..7cbb46784 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -4,40 +4,28 @@ const getStructure = name => require(`../../../../structures/${name}`); const ClientUser = getStructure('ClientUser'); class ReadyHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; + const data = packet.d; const clientUser = new ClientUser(client, data.user); client.user = clientUser; client.readyTime = Date.now(); client.users.set(clientUser.id, clientUser); - for (const guild of data.guilds) { - client.dataManager.newGuild(guild); - } - for (const privateDM of data.private_channels) { - client.dataManager.newChannel(privateDM); - } - - if (!client.user.bot) { - client.setInterval(client.syncGuilds.bind(client), 30000); - } + for (const guild of data.guilds) client.dataManager.newGuild(guild); + for (const privateDM of data.private_channels) client.dataManager.newChannel(privateDM); + if (!client.user.bot) client.setInterval(client.syncGuilds.bind(client), 30000); client.once('ready', client.syncGuilds.bind(client)); client.setTimeout(() => { - if (!client.ws.normalReady) { - client.ws._emitReady(false); - } + if (!client.ws.normalReady) client.ws._emitReady(false); }, 1200 * data.guilds.length); this.packetManager.ws.sessionID = data.session_id; - this.packetManager.ws.checkIfReady(); } - } module.exports = ReadyHandler; diff --git a/src/client/websocket/packets/handlers/TypingStart.js b/src/client/websocket/packets/handlers/TypingStart.js index f751bfb4d..faaa49865 100644 --- a/src/client/websocket/packets/handlers/TypingStart.js +++ b/src/client/websocket/packets/handlers/TypingStart.js @@ -1,28 +1,10 @@ const AbstractHandler = require('./AbstractHandler'); const Constants = require('../../../../util/Constants'); -class TypingData { - constructor(since, lastTimestamp, _timeout) { - this.since = since; - this.lastTimestamp = lastTimestamp; - this._timeout = _timeout; - } - - resetTimeout(_timeout) { - clearTimeout(this._timeout); - this._timeout = _timeout; - } - - get elapsedTime() { - return Date.now() - this.since; - } -} - class TypingStartHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; + const data = packet.d; const channel = client.channels.get(data.channel_id); const user = client.users.get(data.user_id); const timestamp = new Date(data.timestamp * 1000); @@ -46,23 +28,37 @@ class TypingStartHandler extends AbstractHandler { } } } +} +class TypingData { + constructor(since, lastTimestamp, _timeout) { + this.since = since; + this.lastTimestamp = lastTimestamp; + this._timeout = _timeout; + } + + resetTimeout(_timeout) { + clearTimeout(this._timeout); + this._timeout = _timeout; + } + + get elapsedTime() { + return Date.now() - this.since; + } } /** -* Emitted whenever a user starts typing in a channel -* -* @event Client#typingStart -* @param {Channel} channel the channel the user started typing in -* @param {User} user the user that started typing -*/ + * Emitted whenever a user starts typing in a channel + * @event Client#typingStart + * @param {Channel} channel The channel the user started typing in + * @param {User} user The user that started typing + */ /** -* Emitted whenever a user stops typing in a channel -* -* @event Client#typingStop -* @param {Channel} channel the channel the user stopped typing in -* @param {User} user the user that stopped typing -*/ + * Emitted whenever a user stops typing in a channel + * @event Client#typingStop + * @param {Channel} channel The channel the user stopped typing in + * @param {User} user The user that stopped typing + */ module.exports = TypingStartHandler; diff --git a/src/client/websocket/packets/handlers/UserUpdate.js b/src/client/websocket/packets/handlers/UserUpdate.js index f1d6db65c..bc34f347d 100644 --- a/src/client/websocket/packets/handlers/UserUpdate.js +++ b/src/client/websocket/packets/handlers/UserUpdate.js @@ -1,14 +1,11 @@ const AbstractHandler = require('./AbstractHandler'); class UserUpdateHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; client.actions.UserUpdate.handle(data); } - } module.exports = UserUpdateHandler; diff --git a/src/client/websocket/packets/handlers/VoiceServerUpdate.js b/src/client/websocket/packets/handlers/VoiceServerUpdate.js index 4af1b7e4a..146a3efc3 100644 --- a/src/client/websocket/packets/handlers/VoiceServerUpdate.js +++ b/src/client/websocket/packets/handlers/VoiceServerUpdate.js @@ -9,16 +9,13 @@ const AbstractHandler = require('./AbstractHandler'); */ class VoiceServerUpdate extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - + const data = packet.d; if (client.voice.pending.has(data.guild_id)) { client.voice._receivedVoiceServer(data.guild_id, data.token, data.endpoint); } } - } module.exports = VoiceServerUpdate; diff --git a/src/client/websocket/packets/handlers/VoiceStateUpdate.js b/src/client/websocket/packets/handlers/VoiceStateUpdate.js index ba7fe4e81..639da210b 100644 --- a/src/client/websocket/packets/handlers/VoiceStateUpdate.js +++ b/src/client/websocket/packets/handlers/VoiceStateUpdate.js @@ -4,12 +4,11 @@ const Constants = require('../../../../util/Constants'); const cloneObject = require('../../../../util/CloneObject'); class VoiceStateUpdateHandler extends AbstractHandler { - handle(packet) { - const data = packet.d; const client = this.packetManager.client; - const guild = client.guilds.get(data.guild_id); + const data = packet.d; + const guild = client.guilds.get(data.guild_id); if (guild) { const member = guild.members.get(data.user_id); if (member) { @@ -19,18 +18,14 @@ class VoiceStateUpdateHandler extends AbstractHandler { } // if the member left the voice channel, unset their speaking property - if (!data.channel_id) { - member.speaking = null; - } + if (!data.channel_id) member.speaking = null; if (client.voice.pending.has(guild.id) && member.user.id === client.user.id && data.channel_id) { client.voice._receivedVoiceStateUpdate(data.guild_id, data.session_id); } const newChannel = client.channels.get(data.channel_id); - if (newChannel) { - newChannel.members.set(member.user.id, member); - } + if (newChannel) newChannel.members.set(member.user.id, member); member.serverMute = data.mute; member.serverDeaf = data.deaf; @@ -42,15 +37,13 @@ class VoiceStateUpdateHandler extends AbstractHandler { } } } - } /** -* Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes. -* -* @event Client#voiceStateUpdate -* @param {GuildMember} oldMember the member before the voice state update -* @param {GuildMember} newMember the member before the voice state update -*/ + * Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes. + * @event Client#voiceStateUpdate + * @param {GuildMember} oldMember The member before the voice state update + * @param {GuildMember} newMember The member after the voice state update + */ module.exports = VoiceStateUpdateHandler; diff --git a/src/structures/Channel.js b/src/structures/Channel.js index 0a9113696..ae36545ac 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -10,9 +10,7 @@ class Channel { this.client = client; this.typingMap = {}; this.typingTimeouts = []; - if (guild) { - this.guild = guild; - } + if (guild) this.guild = guild; /** * The type of the channel, either: * * `dm` - a DM channel @@ -22,9 +20,7 @@ class Channel { * @type {string} */ this.type = null; - if (data) { - this.setup(data); - } + if (data) this.setup(data); } setup(data) { diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 3d34b61b0..80c8988e4 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -25,7 +25,7 @@ class ClientUser extends User { * Set the username of the logged in Client. * Changing usernames in Discord is heavily rate limited, with only 2 requests * every hour. Use this sparingly! - * @param {string} username the new username + * @param {string} username The new username * @returns {Promise} * @example * // set username @@ -40,7 +40,7 @@ class ClientUser extends User { /** * If this user is a "self bot" or logged in using a normal user's details (which should be avoided), you can set the * email here. - * @param {string} email the new email + * @param {string} email The new email * @returns {Promise} * @example * // set email @@ -55,7 +55,7 @@ class ClientUser extends User { /** * If this user is a "self bot" or logged in using a normal user's details (which should be avoided), you can set the * password here. - * @param {string} password the new password + * @param {string} password The new password * @returns {Promise} * @example * // set password @@ -69,7 +69,7 @@ class ClientUser extends User { /** * Set the avatar of the logged in Client. - * @param {Base64Resolvable} avatar the new avatar + * @param {Base64Resolvable} avatar The new avatar * @returns {Promise} * @example * // set avatar @@ -83,9 +83,9 @@ class ClientUser extends User { /** * Set the status and playing game of the logged in client. - * @param {string} [status] the status, can be `online` or `idle`. - * @param {string|Object} [game] the game that is being played - * @returns {Promise} + * @param {string} [status] The status, can be `online` or `idle` + * @param {string|Object} [game] The game that is being played + * @returns {Promise} * @example * // set status * client.user.setStatus('status', 'game') diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 8cf633f2a..c590bb4c9 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -1,6 +1,6 @@ +const User = require('./User'); const Channel = require('./Channel'); const TextBasedChannel = require('./interface/TextBasedChannel'); -const User = require('./User'); const Collection = require('../util/Collection'); /** diff --git a/src/structures/Emoji.js b/src/structures/Emoji.js index 6a9660749..28c93bb98 100644 --- a/src/structures/Emoji.js +++ b/src/structures/Emoji.js @@ -1,5 +1,5 @@ -const Collection = require('../util/Collection'); const Constants = require('../util/Constants'); +const Collection = require('../util/Collection'); /** * Represents a Custom Emoji @@ -44,16 +44,14 @@ class Emoji { } /** - * A collection of roles this emoji is active for (empty if all). Mapped by role ID. + * A collection of roles this emoji is active for (empty if all), mapped by role ID. * @type {Collection} * @readonly */ get roles() { const roles = new Collection(); for (const role of this.roleIDS) { - if (this.guild.roles.get(role)) { - roles.set(role, this.guild.roles.get(role)); - } + if (this.guild.roles.get(role)) roles.set(role, this.guild.roles.get(role)); } return roles; } diff --git a/src/structures/EvaluatedPermissions.js b/src/structures/EvaluatedPermissions.js index 511972baf..0c66cd437 100644 --- a/src/structures/EvaluatedPermissions.js +++ b/src/structures/EvaluatedPermissions.js @@ -28,31 +28,18 @@ class EvaluatedPermissions { for (const permissionName in Constants.PermissionFlags) { serializedPermissions[permissionName] = this.hasPermission(permissionName); } - return serializedPermissions; } /** - * Checks whether a user has a certain permission, e.g. `READ_MESSAGES`. - * @param {string} permission the permission to check for - * @param {boolean} [explicit=false] whether the user should explicitly have the permission. + * Checks whether the user has a certain permission, e.g. `READ_MESSAGES`. + * @param {PermissionResolvable} permission The permission to check for + * @param {boolean} [explicit=false] Whether to require the user to explicitly have the exact permission * @returns {boolean} */ hasPermission(permission, explicit = false) { - if (typeof permission === 'string') { - permission = Constants.PermissionFlags[permission]; - } - - if (!permission) { - throw Constants.Errors.NOT_A_PERMISSION; - } - - if (!explicit) { - if ((this.permissions & Constants.PermissionFlags.ADMINISTRATOR) > 0) { - return true; - } - } - + permission = this.member.client.resolver.resolvePermission(permission); + if (!explicit && (this.permissions & Constants.PermissionFlags.ADMINISTRATOR) > 0) return true; return (this.permissions & permission) > 0; } } diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index e663fff8e..1c788fc0e 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -1,6 +1,7 @@ const Channel = require('./Channel'); const TextBasedChannel = require('./interface/TextBasedChannel'); const Collection = require('../util/Collection'); +const arraysEqual = require('../util/ArraysEqual'); /* { type: 3, @@ -24,49 +25,31 @@ const Collection = require('../util/Collection'); icon: null } */ - -function arraysEqual(a, b) { - if (a === b) return true; - if (a.length !== b.length) return false; - - for (const itemInd in a) { - const item = a[itemInd]; - const ind = b.indexOf(item); - if (ind) { - b.splice(ind, 1); - } - } - - return b.length === 0; -} - /** * Represents a Group DM on Discord * @extends {Channel} * @implements {TextBasedChannel} */ class GroupDMChannel extends Channel { - constructor(client, data) { super(client, data); - this.messages = new Collection(); } equals(other) { - const base = other && + const equal = other && this.id === other.id && this.name === other.name && this.icon === other.icon && this.owner.id === other.owner_id; - if (base) { + if (equal) { const thisIDs = this.recipients.array().map(r => r.id); const otherIDs = other.recipients.map(r => r.id); return arraysEqual(thisIDs, otherIDs); } - return base; + return equal; } setup(data) { @@ -86,6 +69,7 @@ class GroupDMChannel extends Channel { this.recipients.set(user.id, user); } } + /** * The name of this Group DM, can be null if one isn't set. * @type {string} diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 2d0b76059..374996eab 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -1,25 +1,11 @@ const User = require('./User'); +const Role = require('./Role'); +const Emoji = require('./Emoji'); const GuildMember = require('./GuildMember'); const Constants = require('../util/Constants'); -const cloneObject = require('../util/CloneObject'); -const Role = require('./Role'); const Collection = require('../util/Collection'); -const Emoji = require('./Emoji'); - -function arraysEqual(a, b) { - if (a === b) return true; - if (a.length !== b.length) return false; - - for (const itemInd in a) { - const item = a[itemInd]; - const ind = b.indexOf(item); - if (ind) { - b.splice(ind, 1); - } - } - - return b.length === 0; -} +const cloneObject = require('../util/CloneObject'); +const arraysEqual = require('../util/ArraysEqual'); /** * Represents a Guild (or a Server) on Discord. @@ -50,9 +36,7 @@ class Guild { */ this.roles = new Collection(); - if (!data) { - return; - } + if (!data) return; if (data.unavailable) { /** @@ -100,12 +84,11 @@ class Guild { this.channels.get(voiceState.channel_id).members.set(member.user.id, member); } /** - * Emitted whenever a user joins a guild. - * - * @event Client#guildMemberAdd - * @param {Guild} guild the guild that the user has joined - * @param {GuildMember} member the member that has joined - */ + * Emitted whenever a user joins a guild. + * @event Client#guildMemberAdd + * @param {Guild} guild The guild that the user has joined + * @param {GuildMember} member The member that has joined + */ if (this.client.ws.status === Constants.Status.READY && !noEvent) { this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, member); } @@ -117,25 +100,22 @@ class Guild { _updateMember(member, data) { const oldMember = cloneObject(member); - if (data.roles) { - member._roles = data.roles; - } else { - member.nickname = data.nick; - } + if (data.roles) member._roles = data.roles; + else member.nickname = data.nick; const notSame = member.nickname !== oldMember.nickname && !arraysEqual(member._roles, oldMember._roles); if (this.client.ws.status === Constants.Status.READY && notSame) { /** - * Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname - * - * @event Client#guildMemberUpdate - * @param {Guild} guild the guild that the update affects - * @param {GuildMember} oldMember the member before the update - * @param {GuildMember} newMember the member after the update - */ + * Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname + * @event Client#guildMemberUpdate + * @param {Guild} guild The guild that the update affects + * @param {GuildMember} oldMember The member before the update + * @param {GuildMember} newMember The member after the update + */ this.client.emit(Constants.Events.GUILD_MEMBER_UPDATE, this, oldMember, member); } + return { old: oldMember, mem: member, @@ -163,7 +143,7 @@ class Guild { /** * Returns the GuildMember form of a User object, if the User is present in the guild. - * @param {UserResolvable} user the user that you want to obtain the GuildMember of. + * @param {UserResolvable} user The user that you want to obtain the GuildMember of * @returns {GuildMember|null} * @example * // get the guild member of a user @@ -177,11 +157,11 @@ class Guild { * 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 * what most users need. - * @param {Guild} guild the guild to compare + * @param {Guild} guild The guild to compare * @returns {boolean} */ equals(guild) { - let base = + let equal = guild && this.id === guild.id && this.available === !guild.unavailable && @@ -196,17 +176,15 @@ class Guild { this.verificationLevel === guild.verification_level && this.embedEnabled === guild.embed_enabled; - if (base) { + if (equal) { if (this.embedChannel) { - if (this.embedChannel.id !== guild.embed_channel_id) { - base = false; - } + if (this.embedChannel.id !== guild.embed_channel_id) equal = false; } else if (guild.embed_channel_id) { - base = false; + equal = false; } } - return base; + return equal; } _memberSpeakUpdate(user, speaking) { @@ -216,8 +194,8 @@ class Guild { /** * Emitted once a Guild Member starts/stops speaking * @event Client#guildMemberSpeaking - * @param {GuildMember} member the member that started/stopped speaking - * @param {boolean} speaking whether or not the member is speaking + * @param {GuildMember} member The member that started/stopped speaking + * @param {boolean} speaking Whether or not the member is speaking */ this.client.emit(Constants.Events.GUILD_MEMBER_SPEAKING, member, speaking); } @@ -225,7 +203,7 @@ class Guild { /** * Sets up the Guild - * @param {*} data the raw data of the guild + * @param {*} data The raw data of the guild * @private */ setup(data) { @@ -264,12 +242,12 @@ class Guild { this.icon = data.icon; /** * An array of guild features. - * @type {Array} + * @type {Object[]} */ this.features = data.features; /** * An array of guild emojis. - * @type {Array} + * @type {Object[]} */ this.emojis = new Collection(); for (const emoji of data.emojis) { @@ -351,6 +329,7 @@ class Guild { } } } + /** * The date at which the logged-in client joined the guild. * @type {Date} @@ -361,9 +340,9 @@ class Guild { /** * Creates a new Channel in the Guild. - * @param {string} name the name of the new channel. - * @param {string} type the type of the new channel, either `text` or `voice`. - * @returns {Promise} + * @param {string} name The name of the new channel + * @param {string} type The type of the new channel, either `text` or `voice` + * @returns {Promise} * @example * // create a new text channel * guild.createChannel('new general', 'text') @@ -376,7 +355,7 @@ class Guild { /** * Creates a new role in the guild, as of now this is just a blank role. - * @returns {Promise} + * @returns {Promise} * @example * // create a new role * guild.createRole() @@ -389,7 +368,7 @@ class Guild { /** * Causes the Client to leave the guild. - * @returns {Promise} + * @returns {Promise} * @example * // leave a guild * guild.leave() @@ -402,7 +381,7 @@ class Guild { /** * Causes the Client to delete the guild. - * @returns {Promise} + * @returns {Promise} * @example * // delete a guild * guild.delete() @@ -415,8 +394,8 @@ class Guild { /** * Updates the Guild with new information - e.g. a new name. - * @param {GuildEditData} data the data to update the guild with. - * @returns {Promise} + * @param {GuildEditData} data The data to update the guild with + * @returns {Promise} * @example * // set the guild name and region * guild.edit({ @@ -432,8 +411,8 @@ class Guild { /** * Edit the name of the Guild. - * @param {string} name the new name of the Guild. - * @returns {Promise} + * @param {string} name The new name of the Guild + * @returns {Promise} * @example * // edit the guild name * guild.setName('Discord Guild') @@ -446,8 +425,8 @@ class Guild { /** * Edit the region of the Guild. - * @param {Region} region the new region of the guild. - * @returns {Promise} + * @param {Region} region The new region of the guild. + * @returns {Promise} * @example * // edit the guild region * guild.setRegion('london') @@ -460,8 +439,8 @@ class Guild { /** * Edit the verification level of the Guild. - * @param {VerificationLevel} verificationLevel the new verification level of the guild. - * @returns {Promise} + * @param {VerificationLevel} verificationLevel The new verification level of the guild + * @returns {Promise} * @example * // edit the guild verification level * guild.setVerificationLevel(1) @@ -474,8 +453,8 @@ class Guild { /** * Edit the AFK channel of the Guild. - * @param {GuildChannelResolvable} afkChannel the new AFK channel. - * @returns {Promise} + * @param {GuildChannelResolvable} afkChannel The new AFK channel + * @returns {Promise} * @example * // edit the guild AFK channel * guild.setAFKChannel(channel) @@ -488,8 +467,8 @@ class Guild { /** * Edit the AFK timeout of the Guild. - * @param {number} afkTimeout the time in seconds that a user must be idle to be considered AFK. - * @returns {Promise} + * @param {number} afkTimeout The time in seconds that a user must be idle to be considered AFK + * @returns {Promise} * @example * // edit the guild AFK channel * guild.setAFKTimeout(60) @@ -502,8 +481,8 @@ class Guild { /** * Set a new Guild Icon. - * @param {Base64Resolvable} icon the new icon of the guild. - * @returns {Promise} + * @param {Base64Resolvable} icon The new icon of the guild + * @returns {Promise} * @example * // edit the guild icon * guild.setIcon(fs.readFileSync('./icon.png')) @@ -516,8 +495,8 @@ class Guild { /** * Sets a new owner of the Guild. - * @param {GuildMemberResolvable} owner the new owner of the Guild. - * @returns {Promise} + * @param {GuildMemberResolvable} owner The new owner of the Guild + * @returns {Promise} * @example * // edit the guild owner * guild.setOwner(guilds.members[0]) @@ -530,8 +509,8 @@ class Guild { /** * Set a new Guild Splash Logo. - * @param {Base64Resolvable} splash the new splash screen of the guild. - * @returns {Promise} + * @param {Base64Resolvable} splash The new splash screen of the guild + * @returns {Promise} * @example * // edit the guild splash * guild.setIcon(fs.readFileSync('./splash.png')) @@ -544,8 +523,8 @@ class Guild { /** * Unbans a member from the Guild - * @param {UserResolvable} member the member to unban - * @returns {Promise} + * @param {UserResolvable} member The member to unban + * @returns {Promise} * @example * // unban a member * guild.unban('123123123123') @@ -558,7 +537,7 @@ class Guild { /** * Fetch a Collection of banned users in this Guild. - * @returns {Promise, Error>} + * @returns {Promise>} */ fetchBans() { return this.client.rest.methods.getGuildBans(this); @@ -566,7 +545,7 @@ class Guild { /** * Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes. - * @returns {Promise, Error>} + * @returns {Promise>} */ fetchInvites() { return this.client.rest.methods.getGuildInvites(this); @@ -576,7 +555,7 @@ class Guild { * Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members, * this should not be necessary. * @param {string} [query=''] An optional query to provide when fetching members - * @returns {Promise} + * @returns {Promise} */ fetchMembers(query = '') { return new Promise((resolve, reject) => { @@ -607,9 +586,7 @@ class Guild { * @readonly */ get iconURL() { - if (!this.icon) { - return null; - } + if (!this.icon) return null; return Constants.Endpoints.guildIcon(this.id, this.icon); } diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index f345216cd..aeef11603 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -1,24 +1,10 @@ const Channel = require('./Channel'); -const PermissionOverwrites = require('./PermissionOverwrites'); const Role = require('./Role'); +const PermissionOverwrites = require('./PermissionOverwrites'); const EvaluatedPermissions = require('./EvaluatedPermissions'); const Constants = require('../util/Constants'); const Collection = require('../util/Collection'); - -function arraysEqual(a, b) { - if (a === b) return true; - if (a.length !== b.length) return false; - - for (const itemInd in a) { - const item = a[itemInd]; - const ind = b.indexOf(item); - if (ind) { - b.splice(ind, 1); - } - } - - return b.length === 0; -} +const arraysEqual = require('../util/ArraysEqual'); /** * Represents a Guild Channel (i.e. Text Channels and Voice Channels) @@ -62,67 +48,57 @@ class GuildChannel extends Channel { /** * Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel. * In most cases, a simple `channel.id === channel2.id` will do, and is much faster too. - * @param {GuildChannel} channel the channel to compare this channel to + * @param {GuildChannel} channel The channel to compare this channel to * @returns {boolean} */ equals(channel) { - let base = channel && + let equal = channel && this.type === channel.type && this.topic === channel.topic && this.position === channel.position && this.name === channel.name && this.id === channel.id; - if (base) { + if (equal) { if (channel.permission_overwrites) { const thisIDSet = Array.from(this.permissionOverwrites.keys()); const otherIDSet = channel.permission_overwrites.map(overwrite => overwrite.id); - if (arraysEqual(thisIDSet, otherIDSet)) { - base = true; - } else { - base = false; - } + equal = arraysEqual(thisIDSet, otherIDSet); } else { - base = false; + equal = false; } } - return base; + return equal; } /** * Gets the overall set of permissions for a user in this channel, taking into account roles and permission * overwrites. - * @param {GuildMemberResolvable} member the user that you want to obtain the overall permissions for + * @param {GuildMemberResolvable} member The user that you want to obtain the overall permissions for * @returns {?EvaluatedPermissions} */ permissionsFor(member) { member = this.client.resolver.resolveGuildMember(this.guild, member); if (member) { - if (this.guild.owner.id === member.id) { - return new EvaluatedPermissions(member, Constants.ALL_PERMISSIONS); - } + if (this.guild.owner.id === member.id) return new EvaluatedPermissions(member, Constants.ALL_PERMISSIONS); const roles = member.roles; let permissions = 0; const overwrites = this.overwritesFor(member, true); - for (const role of roles.values()) { - permissions |= role.permissions; - } - + for (const role of roles.values()) permissions |= role.permissions; for (const overwrite of overwrites.role.concat(overwrites.member)) { permissions &= ~overwrite.denyData; permissions |= overwrite.allowData; } const admin = Boolean(permissions & (Constants.PermissionFlags.ADMINISTRATOR)); - if (admin) { - permissions = Constants.ALL_PERMISSIONS; - } + if (admin) permissions = Constants.ALL_PERMISSIONS; return new EvaluatedPermissions(member, permissions); } + return null; } @@ -165,9 +141,9 @@ 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 {PermissionOverwriteOptions} options the configuration for the update - * @returns {Promise} + * @param {Role|UserResolvable} userOrRole The user or role to update + * @param {PermissionOverwriteOptions} options The configuration for the update + * @returns {Promise} * @example * // overwrite permissions for a message author * message.channel.overwritePermissions(message.author, { @@ -187,9 +163,7 @@ class GuildChannel extends Channel { } else { userOrRole = this.client.resolver.resolveUser(userOrRole); payload.type = 'member'; - if (!userOrRole) { - return Promise.reject('supplied parameter was neither a user or a role'); - } + if (!userOrRole) return Promise.reject(new TypeError('supplied parameter was neither a user or a role')); } payload.id = userOrRole.id; @@ -220,7 +194,7 @@ class GuildChannel extends Channel { /** * Set a new name for the Guild Channel - * @param {string} name the new name for the guild channel + * @param {string} name The new name for the guild channel * @returns {Promise} * @example * // set a new channel name @@ -234,7 +208,7 @@ class GuildChannel extends Channel { /** * Set a new position for the Guild Channel - * @param {number} position the new position for the guild channel + * @param {number} position The new position for the guild channel * @returns {Promise} * @example * // set a new channel position @@ -248,7 +222,7 @@ class GuildChannel extends Channel { /** * Set a new topic for the Guild Channel - * @param {string} topic the new topic for the guild channel + * @param {string} topic The new topic for the guild channel * @returns {Promise} * @example * // set a new channel topic @@ -288,8 +262,8 @@ class GuildChannel extends Channel { /** * Create an invite to this Guild Channel - * @param {InviteOptions} [options={}] the options to provide when creating the invite - * @returns {Promise} + * @param {InviteOptions} [options={}] The options for the invite + * @returns {Promise} */ createInvite(options = {}) { return this.client.rest.methods.createChannelInvite(this, options); diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index ef3083e2e..e6a0e291b 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -23,9 +23,7 @@ class GuildMember { */ this.user = {}; this._roles = []; - if (data) { - this.setup(data); - } + if (data) this.setup(data); } setup(data) { @@ -91,15 +89,11 @@ class GuildMember { const list = new Collection(); const everyoneRole = this.guild.roles.get(this.guild.id); - if (everyoneRole) { - list.set(everyoneRole.id, everyoneRole); - } + if (everyoneRole) list.set(everyoneRole.id, everyoneRole); for (const roleID of this._roles) { const role = this.guild.roles.get(roleID); - if (role) { - list.set(role.id, role); - } + if (role) list.set(role.id, role); } return list; @@ -143,8 +137,8 @@ class GuildMember { /** * Mute/unmute a user - * @param {boolean} mute whether or not the member should be muted - * @returns {Promise} + * @param {boolean} mute Whether or not the member should be muted + * @returns {Promise} */ setMute(mute) { return this.edit({ mute }); @@ -152,8 +146,8 @@ class GuildMember { /** * Deafen/undeafen a user - * @param {boolean} deaf whether or not the member should be deafened - * @returns {Promise} + * @param {boolean} deaf Whether or not the member should be deafened + * @returns {Promise} */ setDeaf(deaf) { return this.edit({ deaf }); @@ -161,8 +155,8 @@ class GuildMember { /** * Moves the Guild Member to the given channel. - * @param {ChannelResolvable} channel the channel to move the member to - * @returns {Promise} + * @param {ChannelResolvable} channel The channel to move the member to + * @returns {Promise} */ setVoiceChannel(channel) { return this.edit({ channel }); @@ -170,8 +164,8 @@ class GuildMember { /** * Sets the Roles applied to the member. - * @param {Collection|Array} roles the roles to apply - * @returns {Promise} + * @param {Collection|Role[]} roles The roles to apply + * @returns {Promise} */ setRoles(roles) { return this.edit({ roles }); @@ -179,8 +173,8 @@ class GuildMember { /** * Set the nickname for the Guild Member - * @param {string} nick the nickname for the Guild Member - * @returns {Promise} + * @param {string} nick The nickname for the Guild Member + * @returns {Promise} */ setNickname(nick) { return this.edit({ nick }); @@ -188,15 +182,15 @@ class GuildMember { /** * Edit a Guild Member - * @param {GuildmemberEditData} data the data to edit the member with - * @returns {Promise} + * @param {GuildmemberEditData} data The data to edit the member with + * @returns {Promise} */ edit(data) { return this.client.rest.methods.updateGuildMember(this, data); } /** - * Deletes any DM's with this Guild Member + * Deletes any DMs with this Guild Member * @returns {Promise} */ deleteDM() { @@ -215,7 +209,7 @@ class GuildMember { * Ban this Guild Member * @param {number} [deleteDays=0] The amount of days worth of messages from this member that should * also be deleted. Between `0` and `7`. - * @returns {Promise} + * @returns {Promise} * @example * // ban a guild member * guildMember.ban(7); diff --git a/src/structures/Invite.js b/src/structures/Invite.js index c82ae92fa..1c09e6425 100644 --- a/src/structures/Invite.js +++ b/src/structures/Invite.js @@ -98,7 +98,7 @@ class Invite { /** * Deletes this invite - * @returns {Promise} + * @returns {Promise} */ delete() { return this.client.rest.methods.deleteInvite(this); diff --git a/src/structures/Message.js b/src/structures/Message.js index a681c8b57..f0411460b 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -1,6 +1,7 @@ -const Collection = require('../util/Collection'); const Attachment = require('./MessageAttachment'); const Embed = require('./MessageEmbed'); +const Collection = require('../util/Collection'); + /** * Represents a Message on Discord */ @@ -26,9 +27,7 @@ class Message { * @type {Client} */ this.client = client; - if (data) { - this.setup(data); - } + if (data) this.setup(data); } setup(data) { @@ -69,7 +68,7 @@ class Message { this.nonce = data.nonce; /** * A list of embeds in the message - e.g. YouTube Player - * @type {Array} + * @type {Embed[]} */ this.embeds = data.embeds.map(e => new Embed(this, e)); /** @@ -77,17 +76,15 @@ class Message { * @type {Collection} */ this.attachments = new Collection(); - for (const attachment of data.attachments) { - this.attachments.set(attachment.id, new Attachment(this, attachment)); - } + for (const attachment of data.attachments) this.attachments.set(attachment.id, new Attachment(this, attachment)); /** * An object containing a further users, roles or channels collections * @type {Object} * @property {Collection} mentions.users Mentioned users, maps their ID to the user object. * @property {Collection} mentions.roles Mentioned roles, maps their ID to the role object. - * @property {Collection} - * mentions.channels Mentioned channels, maps their ID to the channel object. - * @property {boolean} mentions.everyone whether or not @everyone was mentioned. + * @property {Collection} mentions.channels Mentioned channels, + * maps their ID to the channel object. + * @property {boolean} mentions.everyone Whether or not @everyone was mentioned. */ this.mentions = { users: new Collection(), @@ -114,9 +111,7 @@ class Message { if (data.mention_roles) { for (const mention of data.mention_roles) { const role = this.channel.guild.roles.get(mention); - if (role) { - this.mentions.roles.set(role.id, role); - } + if (role) this.mentions.roles.set(role.id, role); } } @@ -124,9 +119,7 @@ class Message { const channMentionsRaw = data.content.match(/<#([0-9]{14,20})>/g) || []; for (const raw of channMentionsRaw) { const chan = this.channel.guild.channels.get(raw.match(/([0-9]{14,20})/g)[0]); - if (chan) { - this.mentions.channels.set(chan.id, chan); - } + if (chan) this.mentions.channels.set(chan.id, chan); } } @@ -135,9 +128,7 @@ class Message { * @type {boolean} */ this.system = false; - if (data.type === 6) { - this.system = true; - } + if (data.type === 6) this.system = true; } /** * When the message was sent @@ -158,31 +149,17 @@ class Message { patch(data) { // eslint-disable-line complexity if (data.author) { this.author = this.client.users.get(data.author.id); - if (this.guild) { - this.member = this.guild.member(this.author); - } - } - if (data.content) { - this.content = data.content; - } - if (data.timestamp) { - this._timestamp = new Date(data.timestamp).getTime(); + if (this.guild) this.member = this.guild.member(this.author); } + if (data.content) this.content = data.content; + if (data.timestamp) this._timestamp = new Date(data.timestamp).getTime(); if (data.edited_timestamp) { this._editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp).getTime() : null; } - if ('tts' in data) { - this.tts = data.tts; - } - if ('mention_everyone' in data) { - this.mentions.everyone = data.mention_everyone; - } - if (data.nonce) { - this.nonce = data.nonce; - } - if (data.embeds) { - this.embeds = data.embeds.map(e => new Embed(this, e)); - } + if ('tts' in data) this.tts = data.tts; + if ('mention_everyone' in data) this.mentions.everyone = data.mention_everyone; + if (data.nonce) this.nonce = data.nonce; + if (data.embeds) this.embeds = data.embeds.map(e => new Embed(this, e)); if (data.type > -1) { this.system = false; if (data.type === 6) { @@ -214,9 +191,7 @@ class Message { } } } - if (data.id) { - this.id = data.id; - } + if (data.id) this.id = data.id; if (this.channel.guild && data.content) { const channMentionsRaw = data.content.match(/<#([0-9]{14,20})>/g) || []; for (const raw of channMentionsRaw) { @@ -237,14 +212,11 @@ class Message { * @returns {boolean} */ equals(message, rawData) { + if (!message) return false; const embedUpdate = !message.author && !message.attachments; + if (embedUpdate) return this.id === message.id && this.embeds.length === message.embeds.length; - if (embedUpdate) { - const base = this.id === message.id && - this.embeds.length === message.embeds.length; - return base; - } - let base = this.id === message.id && + let equal = this.id === message.id && this.author.id === message.author.id && this.content === message.content && this.tts === message.tts && @@ -252,19 +224,19 @@ class Message { this.embeds.length === message.embeds.length && this.attachments.length === message.attachments.length; - if (base && rawData) { - base = this.mentions.everyone === message.mentions.everyone && + if (equal && rawData) { + equal = this.mentions.everyone === message.mentions.everyone && this._timestamp === new Date(rawData.timestamp).getTime() && this._editedTimestamp === new Date(rawData.edited_timestamp).getTime(); } - return base; + return equal; } /** * Deletes the message * @param {number} [timeout=0] How long to wait to delete the message in milliseconds - * @returns {Promise} + * @returns {Promise} * @example * // delete a message * message.delete() @@ -283,8 +255,8 @@ class Message { /** * Edit the content of a message - * @param {string} content the new content of a message - * @returns {Promise} + * @param {string} content The new content for the message + * @returns {Promise} * @example * // update the content of a message * message.edit('This is my new content!') @@ -297,9 +269,9 @@ class Message { /** * Reply to a message - * @param {string} content the content of the message - * @param {MessageOptions} [options = {}] the options to provide - * @returns {Promise} + * @param {string} content The content for the message + * @param {MessageOptions} [options = {}] The options to provide + * @returns {Promise} * @example * // reply to a message * message.reply('Hey, I'm a reply!') @@ -313,7 +285,7 @@ class Message { /** * Pins this message to the channel's pinned messages - * @returns {Promise} + * @returns {Promise} */ pin() { return this.client.rest.methods.pinMessage(this); @@ -321,7 +293,7 @@ class Message { /** * Unpins this message from the channel's pinned messages - * @returns {Promise} + * @returns {Promise} */ unpin() { return this.client.rest.methods.unpinMessage(this); diff --git a/src/structures/MessageEmbed.js b/src/structures/MessageEmbed.js index ed426da2e..50f3c2d90 100644 --- a/src/structures/MessageEmbed.js +++ b/src/structures/MessageEmbed.js @@ -1,3 +1,59 @@ +/** + * Represents an embed in an image - e.g. preview of image + */ +class MessageEmbed { + constructor(message, data) { + /** + * The message this embed is part of + * @type {Message} + */ + this.message = message; + /** + * The client that instantiated this embed + * @type {Client} + */ + this.client = message.client; + this.setup(data); + } + + setup(data) { + /** + * The title of this embed, if there is one + * @type {?string} + */ + this.title = data.title; + /** + * The type of this embed + * @type {string} + */ + this.type = data.type; + /** + * The description of this embed, if there is one + * @type {?string} + */ + this.description = data.description; + /** + * The URL of this embed + * @type {string} + */ + this.url = data.url; + if (data.thumbnail) { + /** + * The thumbnail of this embed, if there is one + * @type {MessageEmbedThumbnail} + */ + this.thumbnail = new MessageEmbedThumbnail(this, data.thumbnail); + } + if (data.provider) { + /** + * The provider of this embed, if there is one + * @type {MessageEmbedProvider} + */ + this.provider = new MessageEmbedProvider(this, data.provider); + } + } +} + /** * Represents a thumbnail for a Message embed */ @@ -62,60 +118,4 @@ class MessageEmbedProvider { } } -/** - * Represents an embed in an image - e.g. preview of image - */ -class MessageEmbed { - constructor(message, data) { - /** - * The message this embed is part of - * @type {Message} - */ - this.message = message; - /** - * The client that instantiated this embed - * @type {Client} - */ - this.client = message.client; - this.setup(data); - } - - setup(data) { - /** - * The title of this embed, if there is one - * @type {?string} - */ - this.title = data.title; - /** - * The type of this embed - * @type {string} - */ - this.type = data.type; - /** - * The description of this embed, if there is one - * @type {?string} - */ - this.description = data.description; - /** - * The URL of this embed - * @type {string} - */ - this.url = data.url; - if (data.thumbnail) { - /** - * The thumbnail of this embed, if there is one - * @type {MessageEmbedThumbnail} - */ - this.thumbnail = new MessageEmbedThumbnail(this, data.thumbnail); - } - if (data.provider) { - /** - * The provider of this embed, if there is one - * @type {MessageEmbedProvider} - */ - this.provider = new MessageEmbedProvider(this, data.provider); - } - } -} - module.exports = MessageEmbed; diff --git a/src/structures/PermissionOverwrites.js b/src/structures/PermissionOverwrites.js index b15e27889..7c31c7fc2 100644 --- a/src/structures/PermissionOverwrites.js +++ b/src/structures/PermissionOverwrites.js @@ -8,9 +8,7 @@ class PermissionOverwrites { * @type {GuildChannel} */ this.channel = guildChannel; - if (data) { - this.setup(data); - } + if (data) this.setup(data); } setup(data) { @@ -30,7 +28,7 @@ class PermissionOverwrites { /** * Delete this Permission Overwrite. - * @returns {Promise} + * @returns {Promise} */ delete() { return this.channel.client.rest.methods.deletePermissionOverwrites(this); diff --git a/src/structures/Role.js b/src/structures/Role.js index d33ef48d6..febe970b9 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -15,22 +15,18 @@ class Role { * @type {Client} */ this.client = guild.client; - if (data) { - this.setup(data); - } + if (data) this.setup(data); } equals(role) { - return ( - role && + return role && this.id === role.id && this.name === role.name && this.color === role.color && this.hoist === role.hoist && this.position === role.position && this.permissions === role.permissions && - this.managed === role.managed - ); + this.managed === role.managed; } setup(data) { @@ -73,7 +69,7 @@ class Role { /** * Deletes the role - * @returns {Promise} + * @returns {Promise} * @example * // delete a role * role.delete() @@ -86,8 +82,8 @@ class Role { /** * Edits the role - * @param {RoleData} data the new data for the role - * @returns {Promise} + * @param {RoleData} data The new data for the role + * @returns {Promise} * @example * // edit a role * role.edit({name: 'new role'}) @@ -100,8 +96,8 @@ class Role { /** * Set a new name for the role - * @param {string} name the new name of the role - * @returns {Promise} + * @param {string} name The new name of the role + * @returns {Promise} * @example * // set the name of the role * role.setName('new role') @@ -114,8 +110,8 @@ class Role { /** * Set a new color for the role - * @param {number|string} color the new color for the role, either a hex string or a base 10 number - * @returns {Promise} + * @param {number|string} color The new color for the role, either a hex string or a base 10 number + * @returns {Promise} * @example * // set the color of a role * role.setColor('#FF0000') @@ -128,8 +124,8 @@ class Role { /** * Set whether or not the role should be hoisted - * @param {boolean} hoist whether or not to hoist the role - * @returns {Promise} + * @param {boolean} hoist Whether or not to hoist the role + * @returns {Promise} * @example * // set the hoist of the role * role.setHoist(true) @@ -142,8 +138,8 @@ class Role { /** * Set the position of the role - * @param {number} position the position of the role - * @returns {Promise} + * @param {number} position The position of the role + * @returns {Promise} * @example * // set the position of the role * role.setPosition(1) @@ -156,8 +152,8 @@ class Role { /** * Set the permissions of the role - * @param {Array} permissions the permissions of the role - * @returns {Promise} + * @param {string[]} permissions The permissions of the role + * @returns {Promise} * @example * // set the permissions of the role * role.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS']) @@ -180,14 +176,13 @@ class Role { for (const permissionName in Constants.PermissionFlags) { serializedPermissions[permissionName] = this.hasPermission(permissionName); } - return serializedPermissions; } /** * Whether or not the role includes the given permission - * @param {string} permission the name of the permission to test - * @param {boolean} [explicit=false] whether or not the inclusion of the permission is explicit + * @param {PermissionResolvable} permission The name of the permission to test + * @param {boolean} [explicit=false] Whether to require the role to explicitly have the exact permission * @returns {boolean} * @example * // see if a role can ban a member @@ -198,20 +193,8 @@ class Role { * } */ hasPermission(permission, explicit = false) { - if (typeof permission === 'string') { - permission = Constants.PermissionFlags[permission]; - } - - if (!permission) { - throw Constants.Errors.NOT_A_PERMISSION; - } - - if (!explicit) { - if ((this.permissions & Constants.PermissionFlags.ADMINISTRATOR) > 0) { - return true; - } - } - + permission = this.client.resolver.resolvePermission(permission); + if (!explicit && (this.permissions & Constants.PermissionFlags.ADMINISTRATOR) > 0) return true; return (this.permissions & permission) > 0; } @@ -230,9 +213,7 @@ class Role { */ get hexColor() { let col = this.color.toString(16); - while (col.length < 6) { - col = `0${col}`; - } + while (col.length < 6) col = `0${col}`; return `#${col}`; } } diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 8aab8454e..671ee9aac 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -8,7 +8,6 @@ const Collection = require('../util/Collection'); * @implements {TextBasedChannel} */ class TextChannel extends GuildChannel { - constructor(guild, data) { super(guild, data); this.messages = new Collection(); diff --git a/src/structures/User.js b/src/structures/User.js index c1d3ee5e1..53a0926c8 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -8,9 +8,7 @@ const Constants = require('../util/Constants'); class User { constructor(client, data) { this.client = client; - if (data) { - this.setup(data); - } + if (data) this.setup(data); } setup(data) { @@ -72,9 +70,7 @@ class User { * @readonly */ get avatarURL() { - if (!this.avatar) { - return null; - } + if (!this.avatar) return null; return Constants.Endpoints.avatar(this.id, this.avatar); } @@ -89,28 +85,23 @@ class User { /** * 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. - * @param {User} user the user to compare + * @param {User} user The user to compare * @returns {boolean} */ equals(user) { - let base = user && + let equal = user && this.username === user.username && this.id === user.id && this.discriminator === user.discriminator && this.avatar === user.avatar && this.bot === Boolean(user.bot); - if (base) { - if (user.status) { - base = this.status === user.status; - } - - if (user.game) { - base = this.game === user.game; - } + if (equal) { + if (user.status) equal = this.status === user.status; + if (equal && user.game) equal = this.game === user.game; } - return base; + return equal; } sendMessage() { diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index b33d5dbd9..b5174c3d6 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -32,7 +32,7 @@ class VoiceChannel extends GuildChannel { /** * Sets the bitrate of the channel - * @param {number} bitrate the new bitrate + * @param {number} bitrate The new bitrate * @returns {Promise} * @example * // set the bitrate of a voice channel @@ -46,7 +46,7 @@ class VoiceChannel extends GuildChannel { /** * Attempts to join this Voice Channel - * @returns {Promise} + * @returns {Promise} * @example * // join a voice channel * voiceChannel.join() @@ -64,12 +64,8 @@ class VoiceChannel extends GuildChannel { * voiceChannel.leave(); */ leave() { - const exists = this.client.voice.connections.get(this.guild.id); - if (exists) { - if (exists.channel.id === this.id) { - exists.disconnect(); - } - } + const connection = this.client.voice.connections.get(this.guild.id); + if (connection && connection.channel.id === this.id) connection.disconnect(); } } diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index e5d719a22..17cfa92fb 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -1,128 +1,13 @@ -const Collection = require('../../util/Collection'); -const Message = require('../Message'); const path = require('path'); const EventEmitter = require('events').EventEmitter; - -/** - * A function that takes a Message object and a MessageCollector and returns a boolean. - * ```js - * function(message, collector) { - * if (message.content.includes('discord')) { - * return true; // passed the filter test - * } - * return false; // failed the filter test - * } - * ``` - * @typedef {function} CollectorFilterFunction - */ - -/** - * An object containing options used to configure a MessageCollector. All properties are optional. - * ```js - * { - * time: null, // time in milliseconds. If specified, the collector ends after this amount of time. - * max: null, // the maximum amount of messages to handle before ending. - * } - * ``` - * @typedef {Object} CollectorOptions - */ - -/** - * Collects messages based on a specified filter, then emits them. - * @extends {EventEmitter} - */ -class MessageCollector extends EventEmitter { - constructor(channel, filter, options = {}) { - super(); - /** - * The channel this collector is operating on - * @type {Channel} - */ - this.channel = channel; - /** - * A function used to filter messages that the collector collects. - * @type {CollectorFilterFunction} - */ - this.filter = filter; - /** - * Options for the collecor. - * @type {CollectorOptions} - */ - this.options = options; - /** - * Whether this collector has stopped collecting Messages. - * @type {boolean} - */ - this.ended = false; - this.listener = message => this.verify(message); - this.channel.client.on('message', this.listener); - /** - * A collection of collected messages, mapped by message ID. - * @type {Collection} - */ - this.collected = new Collection(); - if (options.time) { - this.channel.client.setTimeout(() => this.stop('time'), options.time); - } - } - - /** - * Verifies a message against the filter and options - * @private - * @param {Message} message the message - * @returns {boolean} - */ - verify(message) { - if (this.channel ? this.channel.id !== message.channel.id : false) { - return false; - } - if (this.filter(message, this)) { - this.collected.set(message.id, message); - /** - * Emitted whenever the Collector receives a Message that passes the filter test. - * @param {Message} message the received message - * @param {MessageCollector} collector the collector the message passed through. - * @event MessageCollector#message - */ - this.emit('message', message, this); - if (this.options.max && this.collected.size === this.options.max) { - this.stop('limit'); - } - return true; - } - return false; - } - - /** - * Stops the collector and emits `end`. - * @param {string} [reason='user'] an optional reason for stopping the collector. - */ - stop(reason = 'user') { - if (this.ended) { - return; - } - this.ended = true; - this.channel.client.removeListener('message', this.listener); - /** - * Emitted when the Collector stops collecting. - * @param {Collection} collection A collection of messages collected - * during the lifetime of the Collector. - * Mapped by the ID of the Messages. - * @param {string} reason The reason for the end of the collector. If it ended because it reached the specified time - * limit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it - * ended because it reached its message limit, it will be `limit`. - * @event MessageCollector#end - */ - this.emit('end', this.collected, reason); - } -} +const Message = require('../Message'); +const Collection = require('../../util/Collection'); /** * Interface for classes that have text-channel-like features * @interface */ class TextBasedChannel { - constructor() { /** * A Collection containing the messages sent to this channel. @@ -133,19 +18,16 @@ class TextBasedChannel { /** * Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after. - * @param {Map|Array} messages the messages to delete + * @param {Collection|Message[]} messages The messages to delete * @returns {Collection} */ bulkDelete(messages) { - if (messages instanceof Map) { - messages = messages.array(); - } - if (!(messages instanceof Array)) { - return Promise.reject('pass an array or map'); - } + 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); } + /** * Options that can be passed into sendMessage or sendTTSMessage: * ```js @@ -156,10 +38,11 @@ class TextBasedChannel { * ``` * @typedef {Object} MessageOptions */ + /** * Send a message to this channel - * @param {string} content the content to send - * @param {MessageOptions} [options={}] the options to provide + * @param {string} content The content to send + * @param {MessageOptions} [options={}] The options to provide * @returns {Promise} * @example * // send a message @@ -170,10 +53,11 @@ class TextBasedChannel { sendMessage(content, options = {}) { return this.client.rest.methods.sendMessage(this, content, options.tts, options.nonce); } + /** * Send a text-to-speech message to this channel - * @param {string} content the content to send - * @param {MessageOptions} [options={}] the options to provide + * @param {string} content The content to send + * @param {MessageOptions} [options={}] The options to provide * @returns {Promise} * @example * // send a TTS message @@ -184,6 +68,7 @@ class TextBasedChannel { sendTTSMessage(content, options = {}) { return this.client.rest.methods.sendMessage(this, content, true, options.nonce); } + /** * Send a file to this channel * @param {FileResolvable} attachment The file to send @@ -201,16 +86,15 @@ class TextBasedChannel { } } return new Promise((resolve, reject) => { - this.client.resolver.resolveFile(attachment) - .then(file => { + this.client.resolver.resolveFile(attachment).then(file => { this.client.rest.methods.sendMessage(this, undefined, false, undefined, { file, name: fileName, }).then(resolve).catch(reject); - }) - .catch(reject); + }).catch(reject); }); } + /** * The parameters to pass in when requesting previous messages from a channel. `around`, `before` and * `after` are mutually exclusive. All the parameters are optional. @@ -227,8 +111,8 @@ class TextBasedChannel { /** * Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects. - * @param {ChannelLogsQueryOptions} [options={}] the query parameters to pass in - * @returns {Promise, Error>} + * @param {ChannelLogsQueryOptions} [options={}] The query parameters to pass in + * @returns {Promise>} * @example * // get messages * channel.fetchMessages({limit: 10}) @@ -237,17 +121,15 @@ class TextBasedChannel { */ fetchMessages(options = {}) { return new Promise((resolve, reject) => { - this.client.rest.methods.getChannelMessages(this, options) - .then(data => { - const messages = new Collection(); - for (const message of data) { - const msg = new Message(this, message, this.client); - messages.set(message.id, msg); - this._cacheMessage(msg); - } - resolve(messages); - }) - .catch(reject); + this.client.rest.methods.getChannelMessages(this, options).then(data => { + const messages = new Collection(); + for (const message of data) { + const msg = new Message(this, message, this.client); + messages.set(message.id, msg); + this._cacheMessage(msg); + } + resolve(messages); + }).catch(reject); }); } @@ -278,7 +160,7 @@ class TextBasedChannel { * Stops the typing indicator in the channel. * The indicator will only stop if this is called as many times as startTyping(). * It can take a few seconds for the Client User to stop typing. - * @param {boolean} [force=false] whether or not to force the indicator to stop regardless of call count + * @param {boolean} [force=false] Whether or not to reset the call count and force the indicator to stop * @example * // stop typing in a channel * channel.stopTyping(); @@ -316,8 +198,8 @@ class TextBasedChannel { /** * Creates a Message Collector - * @param {CollectorFilterFunction} filter the filter to create the collector with - * @param {CollectorOptions} [options={}] the options to pass to the collector + * @param {CollectorFilterFunction} filter The filter to create the collector with + * @param {CollectorOptions} [options={}] The options to pass to the collector * @returns {MessageCollector} * @example * // create a message collector @@ -329,8 +211,7 @@ class TextBasedChannel { * collector.on('end', collected => console.log(`Collected ${collected.size} items`)); */ createCollector(filter, options = {}) { - const collector = new MessageCollector(this, filter, options); - return collector; + return new MessageCollector(this, filter, options); } /** @@ -346,8 +227,8 @@ class TextBasedChannel { /** * Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified * filter. - * @param {CollectorFilterFunction} filter the filter function to use - * @param {AwaitMessagesOptions} [options={}] optional options to pass to the internal collector + * @param {CollectorFilterFunction} filter The filter function to use + * @param {AwaitMessagesOptions} [options={}] Optional options to pass to the internal collector * @returns {Promise>} * @example * // await !vote messages @@ -372,43 +253,140 @@ class TextBasedChannel { _cacheMessage(message) { const maxSize = this.client.options.max_message_cache; - if (maxSize === 0) { - // saves on performance - return null; - } - - if (this.messages.size >= maxSize) { - this.messages.delete(this.messages.keys().next().value); - } + if (maxSize === 0) return null; + if (this.messages.size >= maxSize) this.messages.delete(this.messages.keys().next().value); this.messages.set(message.id, message); - return message; } /** * Fetches the pinned messages of this Channel and returns a Collection of them. - * @returns {Promise, Error>} + * @returns {Promise>} */ fetchPinnedMessages() { return new Promise((resolve, reject) => { - this.client.rest.methods.getChannelPinnedMessages(this) - .then(data => { - const messages = new Collection(); - for (const message of data) { - const msg = new Message(this, message, this.client); - messages.set(message.id, msg); - this._cacheMessage(msg); - } - resolve(messages); - }) - .catch(reject); + this.client.rest.methods.getChannelPinnedMessages(this).then(data => { + const messages = new Collection(); + for (const message of data) { + const msg = new Message(this, message, this.client); + messages.set(message.id, msg); + this._cacheMessage(msg); + } + resolve(messages); + }).catch(reject); }); } } -function applyProp(structure, prop) { - Object.defineProperty(structure.prototype, prop, Object.getOwnPropertyDescriptor(TextBasedChannel.prototype, prop)); +/** + * Collects messages based on a specified filter, then emits them. + * @extends {EventEmitter} + */ +class MessageCollector extends EventEmitter { + /** + * A function that takes a Message object and a MessageCollector and returns a boolean. + * ```js + * function(message, collector) { + * if (message.content.includes('discord')) { + * return true; // passed the filter test + * } + * return false; // failed the filter test + * } + * ``` + * @typedef {function} CollectorFilterFunction + */ + + /** + * An object containing options used to configure a MessageCollector. All properties are optional. + * ```js + * { + * time: null, // time in milliseconds. If specified, the collector ends after this amount of time. + * max: null, // the maximum amount of messages to handle before ending. + * } + * ``` + * @typedef {Object} CollectorOptions + */ + + /** + * @param {Channel} channel The channel to collect messages in + * @param {CollectorFilterFunction} filter The filter function + * @param {CollectorOptions} [options] Options for the collector + */ + constructor(channel, filter, options = {}) { + super(); + /** + * The channel this collector is operating on + * @type {Channel} + */ + this.channel = channel; + /** + * A function used to filter messages that the collector collects. + * @type {CollectorFilterFunction} + */ + this.filter = filter; + /** + * Options for the collecor. + * @type {CollectorOptions} + */ + this.options = options; + /** + * Whether this collector has stopped collecting Messages. + * @type {boolean} + */ + this.ended = false; + this.listener = message => this.verify(message); + this.channel.client.on('message', this.listener); + /** + * A collection of collected messages, mapped by message ID. + * @type {Collection} + */ + this.collected = new Collection(); + if (options.time) this.channel.client.setTimeout(() => this.stop('time'), options.time); + } + + /** + * Verifies a message against the filter and options + * @private + * @param {Message} message The message + * @returns {boolean} + */ + verify(message) { + if (this.channel ? this.channel.id !== message.channel.id : false) return false; + if (this.filter(message, this)) { + this.collected.set(message.id, message); + /** + * Emitted whenever the Collector receives a Message that passes the filter test. + * @param {Message} message The received message + * @param {MessageCollector} collector The collector the message passed through + * @event MessageCollector#message + */ + this.emit('message', message, this); + if (this.options.max && this.collected.size === this.options.max) this.stop('limit'); + return true; + } + return false; + } + + /** + * Stops the collector and emits `end`. + * @param {string} [reason='user'] An optional reason for stopping the collector + */ + stop(reason = 'user') { + if (this.ended) return; + this.ended = true; + this.channel.client.removeListener('message', this.listener); + /** + * Emitted when the Collector stops collecting. + * @param {Collection} collection A collection of messages collected + * during the lifetime of the Collector, mapped by the ID of the Messages. + * @param {string} reason The reason for the end of the collector. If it ended because it reached the specified time + * limit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it + * ended because it reached its message limit, it will be `limit`. + * @event MessageCollector#end + */ + this.emit('end', this.collected, reason); + } } exports.applyToClass = (structure, full = false) => { @@ -425,7 +403,9 @@ exports.applyToClass = (structure, full = false) => { props.push('createCollector'); props.push('awaitMessages'); } - for (const prop of props) { - applyProp(structure, prop); - } + for (const prop of props) applyProp(structure, prop); }; + +function applyProp(structure, prop) { + Object.defineProperty(structure.prototype, prop, Object.getOwnPropertyDescriptor(TextBasedChannel.prototype, prop)); +} diff --git a/src/util/ArraysEqual.js b/src/util/ArraysEqual.js new file mode 100644 index 000000000..efd8275c9 --- /dev/null +++ b/src/util/ArraysEqual.js @@ -0,0 +1,14 @@ +module.exports = function arraysEqual(a, b) { + if (a === b) return true; + if (a.length !== b.length) return false; + + for (const itemInd in a) { + const item = a[itemInd]; + const ind = b.indexOf(item); + if (ind) { + b.splice(ind, 1); + } + } + + return b.length === 0; +}; diff --git a/src/util/CloneObject.js b/src/util/CloneObject.js index 726712fb6..13366a7b7 100644 --- a/src/util/CloneObject.js +++ b/src/util/CloneObject.js @@ -1,6 +1,5 @@ module.exports = function cloneObject(obj) { const cloned = Object.create(obj); Object.assign(cloned, obj); - return cloned; }; diff --git a/src/util/Collection.js b/src/util/Collection.js index 9c85d7353..16612b904 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -3,10 +3,9 @@ * @extends {Map} */ class Collection extends Map { - /** * Returns an ordered array of the values of this collection. - * @returns {Array} + * @returns {*[]} * @example * // identical to: * Array.from(collection.values()); @@ -17,18 +16,19 @@ class Collection extends Map { /** * Returns the first item in this collection. - * @returns {Object} + * @returns {*} * @example * // identical to: * Array.from(collection.values())[0]; */ first() { - return this.array()[0]; + return this.values().next().value; } /** - * Returns the last item in this collection. - * @returns {Object} + * Returns the last item in this collection. This is a relatively slow operation, + * since an array copy of the values must be made to find the last element. + * @returns {*} */ last() { const arr = this.array(); @@ -36,8 +36,9 @@ class Collection extends Map { } /** - * Returns a random item from this collection. - * @returns {Object} + * Returns a random item from this collection. This is a relatively slow operation, + * since an array copy of the values must be made to find a random element. + * @returns {*} */ random() { const arr = this.array(); @@ -47,32 +48,21 @@ class Collection extends Map { /** * If the items in this collection have a delete method (e.g. messages), invoke * the delete method. Returns an array of promises - * @returns {Array} + * @returns {Promise[]} */ deleteAll() { const returns = []; for (const item of this.values()) { - if (item.delete) { - returns.push(item.delete()); - } + if (item.delete) returns.push(item.delete()); } return returns; } - /** - * The length (size) of this collection. - * @readonly - * @type {number} - */ - get length() { - return this.size; - } - /** * Returns an array of items where `item[key] === value` of the collection - * @param {string} key the key to filter by - * @param {*} value the expected value - * @returns {Array} + * @param {string} key The key to filter by + * @param {*} value The expected value + * @returns {*[]} * @example * collection.getAll('username', 'Bob'); */ @@ -81,18 +71,16 @@ class Collection extends Map { if (typeof value === 'undefined') throw new Error('value must be specified'); const results = []; for (const item of this.values()) { - if (item[key] === value) { - results.push(item); - } + if (item[key] === value) results.push(item); } return results; } /** * Returns a single item where `item[key] === value` - * @param {string} key the key to filter by - * @param {*} value the expected value - * @returns {Object} + * @param {string} key The key to filter by + * @param {*} value The expected value + * @returns {*} * @example * collection.get('id', '123123...'); */ @@ -100,17 +88,15 @@ class Collection extends Map { if (typeof key !== 'string') throw new TypeError('key must be a string'); if (typeof value === 'undefined') throw new Error('value must be specified'); for (const item of this.values()) { - if (item[key] === value) { - return item; - } + if (item[key] === value) return item; } return null; } /** * Returns true if the collection has an item where `item[key] === value` - * @param {string} key the key to filter by - * @param {*} value the expected value + * @param {string} key The key to filter by + * @param {*} value The expected value * @returns {boolean} * @example * if (collection.exists('id', '123123...')) { @@ -121,32 +107,26 @@ class Collection extends Map { return Boolean(this.find(key, value)); } - _arrayMethod(method, args) { - return Array.prototype[method].apply(this.array(), args); - } - /** * Identical to * [Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), * but returns a Collection instead of an Array. - * @param {function} callback the callback used to filter - * @param {Object} [thisArg] value to set as this when filtering + * @param {function} callback Function used to filter (should return a boolean) + * @param {Object} [thisArg] Value to set as this when filtering * @returns {Collection} */ filter(...args) { const newArray = this.array().filter(...args); const collection = new Collection(); - for (const item of newArray) { - collection.set(item.id, item); - } + for (const item of newArray) collection.set(item.id, item); return collection; } /** * Functionally identical shortcut to `collection.array().map(...)`. - * @param {function} callback Function that produces an element of the new Array, taking three arguments. + * @param {function} callback Function that produces an element of the new Array, taking three arguments * @param {*} [thisArg] Optional. Value to use as this when executing callback. - * @returns {array} + * @returns {*[]} */ map(...args) { return this.array().map(...args); diff --git a/src/util/Constants.js b/src/util/Constants.js index db3bb220b..fbf359937 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -67,7 +67,7 @@ exports.Errors = { NO_BOT_ACCOUNT: new Error('you should ideally be using a bot account!'), BAD_WS_MESSAGE: new Error('a bad message was received from the websocket - bad compression or not json'), TOOK_TOO_LONG: new Error('something took too long to do'), - NOT_A_PERMISSION: new Error('that is not a valid permission number'), + NOT_A_PERMISSION: new Error('that is not a valid permission string or number'), INVALID_RATE_LIMIT_METHOD: new Error('unknown rate limiting method'), BAD_LOGIN: new Error('incorrect login details were provided'), }; @@ -235,10 +235,7 @@ const PermissionFlags = exports.PermissionFlags = { }; let _ALL_PERMISSIONS = 0; - -for (const key in PermissionFlags) { - _ALL_PERMISSIONS |= PermissionFlags[key]; -} +for (const key in PermissionFlags) _ALL_PERMISSIONS |= PermissionFlags[key]; exports.ALL_PERMISSIONS = _ALL_PERMISSIONS; diff --git a/src/util/MergeDefault.js b/src/util/MergeDefault.js index d07044cdc..b09f9701b 100644 --- a/src/util/MergeDefault.js +++ b/src/util/MergeDefault.js @@ -1,10 +1,5 @@ module.exports = function merge(def, given) { - if (!given) { - return def; - } - - given = given || {}; - + if (!given) return def; for (const key in def) { if (!{}.hasOwnProperty.call(given, key)) { given[key] = def[key]; From 0c32e590a8cd477c23fb8d44639509e4a885e5fe Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 4 Sep 2016 11:35:13 +0100 Subject: [PATCH 316/324] fix constants reference --- src/client/ClientDataResolver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index df451124e..d7487a3bb 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -2,7 +2,7 @@ const path = require('path'); const fs = require('fs'); const request = require('superagent'); -const Constants = require('../util/constants'); +const Constants = require('../util/Constants'); const User = require(`../structures/User`); const Message = require(`../structures/Message`); const Guild = require(`../structures/Guild`); From 4d2bb891a989567f4a4b053d599ea765bb189b74 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 4 Sep 2016 11:39:36 +0100 Subject: [PATCH 317/324] Fix doc gen --- docs/docs.json | 2 +- src/util/Collection.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 373b4817e..c30b5183d 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472942799355},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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":181,"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":196,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":107,"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":206,"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":215,"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":28,"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":46,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"the guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":44,"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":27,"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":41,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":35,"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":28,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":34,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":64,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":72,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":201,"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":211,"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":254,"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":102,"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":129,"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":216,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":213,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":230,"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":238,"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":246,"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":253,"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":260,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":222,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":142,"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":150,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":165,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":95,"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":104,"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":115,"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":91,"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.log);"],"meta":{"line":224,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"the path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":251,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":261,"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":31,"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":36,"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":41,"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":52,"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":78,"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":119,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":143,"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":197,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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":131,"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":304,"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":312,"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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"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 a user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":41,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the permission to check for","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether the user should explicitly have the permission.","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":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":80,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":93,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":98,"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":103,"file":"GroupDMChannel.js","path":"src/structures"},"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":108,"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":113,"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":131,"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":304,"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":312,"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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":160,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":172,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":183,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":373,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":386,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":399,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":412,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":429,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":443,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":457,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":471,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":485,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":499,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":513,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":527,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":541,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":555,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":563,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">, "],["Error",">"]]]},"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":571,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":581,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":628,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":238,"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":243,"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":248,"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":253,"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":258,"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":264,"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":269,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":274,"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":282,"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":287,"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":292,"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":297,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":358,"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":609,"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":621,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":99,"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.log);"],"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"meta":{"line":231,"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.log);"],"meta":{"line":245,"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.log);"],"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":149,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":158,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":167,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":176,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":185,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":194,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":202,"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":210,"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":223,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":37,"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":42,"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":47,"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":52,"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":57,"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":62,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":68,"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":73,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":81,"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":90,"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":113,"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":122,"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":131,"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":140,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":100,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":46,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":51,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":63,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":81,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":106,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector.\nMapped 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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":239,"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#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.log);"],"meta":{"line":274,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":294,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":318,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":326,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"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":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":69,"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":74,"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":79,"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":92,"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, maps 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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":102,"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":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":146,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":154,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["string",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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":131,"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":304,"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":312,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":99,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":179,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":231,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":245,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":259,"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#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":273,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":99,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"the expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":120,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"the key to filter by","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":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":151,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments.","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":124,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":139,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":170,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":184,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["string",""]]]}},{"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":193,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"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":261,"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":289,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"whether or not to force the indicator to stop regardless of call count","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":331,"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":360,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":393,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">, "],["Error",">"]]]},"params":[]}],"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":131,"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":304,"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":312,"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":24,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":78,"file":"ClientDataResolver.js","path":"src/client"}},{"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":106,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["string",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":150,"file":"ClientDataResolver.js","path":"src/client"}},{"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":175,"file":"ClientDataResolver.js","path":"src/client"}},{"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":155,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":277,"file":"GuildChannel.js","path":"src/structures"}},{"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":6,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":19,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":149,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":336,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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":12,"date":1472985580690},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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":138,"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":174,"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"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":75,"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":80,"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":85,"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":90,"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":95,"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":100,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":105,"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":199,"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":208,"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: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:guildRoleUpdated","name":"guildRoleUpdated","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":35,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":33,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"The client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"The client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":57,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence 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":64,"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":50,"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":57,"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:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":183,"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":193,"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":235,"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":86,"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":109,"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":194,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":208,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":225,"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":233,"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":241,"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":248,"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":255,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":217,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":136,"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":144,"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":157,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":91,"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":101,"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":109,"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":91,"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.log);"],"meta":{"line":215,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":233,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":252,"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":31,"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":36,"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":41,"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":52,"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":78,"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":115,"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":139,"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":191,"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":"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.log); // log error"],"meta":{"line":43,"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":22,"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":[]}],"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online` or `idle`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":[]}],"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":76,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":64,"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",""]]]}}]}],"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":[]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":63,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":77,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":82,"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":87,"file":"GroupDMChannel.js","path":"src/structures"},"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":92,"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":97,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":13,"file":"Guild.js","path":"src/structures"},"methods":[{"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":140,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":152,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":352,"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":365,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":378,"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.log);"],"meta":{"line":391,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"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.log);"],"meta":{"line":408,"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.log);"],"meta":{"line":422,"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.log);"],"meta":{"line":436,"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.log);"],"meta":{"line":450,"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.log);"],"meta":{"line":464,"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.log);"],"meta":{"line":478,"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.log);"],"meta":{"line":492,"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.log);"],"meta":{"line":506,"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.log);"],"meta":{"line":520,"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#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":534,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"member","description":"The member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":542,"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":550,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"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":560,"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#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":605,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":19,"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":25,"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":31,"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":37,"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":46,"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":51,"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":216,"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":221,"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":226,"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":231,"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":236,"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":242,"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":247,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":252,"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":260,"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":265,"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":270,"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":275,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":337,"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":588,"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":598,"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#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":54,"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#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":81,"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.log);"],"meta":{"line":155,"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.log);"],"meta":{"line":205,"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.log);"],"meta":{"line":219,"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.log);"],"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":268,"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#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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":22,"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":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":143,"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":152,"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":161,"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":170,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":179,"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#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":188,"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#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":196,"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":204,"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":217,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":35,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":66,"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":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"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":107,"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":116,"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":125,"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":134,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":286,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":375,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":327,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":332,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":358,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":379,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"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":214,"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#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.log);"],"meta":{"line":246,"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#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":266,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":290,"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":298,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":29,"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":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":43,"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":50,"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":56,"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":68,"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":73,"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":78,"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":89,"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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":99,"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":130,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"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#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":15,"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":24,"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":29,"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":34,"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":39,"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":45,"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":52,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":60,"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":66,"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":75,"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":80,"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":85,"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":90,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":97,"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":103,"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":112,"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":117,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":33,"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":79,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":93,"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.log);"],"meta":{"line":107,"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.log);"],"meta":{"line":121,"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.log);"],"meta":{"line":135,"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.log);"],"meta":{"line":149,"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.log);"],"meta":{"line":163,"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#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":174,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":195,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The name of the permission to test","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":205,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":37,"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":42,"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":47,"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":52,"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":57,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":62,"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":67,"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":214,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"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":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":24,"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":33,"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":43,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"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":53,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":87,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":106,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"The key to filter by","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":118,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"Function used to filter (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]}],"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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"}},{"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":56,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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":96,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":113,"file":"ClientDataResolver.js","path":"src/client"}},{"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","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":131,"file":"ClientDataResolver.js","path":"src/client"}},{"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":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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":168,"file":"ClientDataResolver.js","path":"src/client"}},{"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":131,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":251,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":98,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":217,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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":287,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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/util/Collection.js b/src/util/Collection.js index 16612b904..3d9726344 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -5,7 +5,7 @@ class Collection extends Map { /** * Returns an ordered array of the values of this collection. - * @returns {*[]} + * @returns {array} * @example * // identical to: * Array.from(collection.values()); @@ -62,7 +62,7 @@ class Collection extends Map { * Returns an array of items where `item[key] === value` of the collection * @param {string} key The key to filter by * @param {*} value The expected value - * @returns {*[]} + * @returns {array} * @example * collection.getAll('username', 'Bob'); */ @@ -126,7 +126,7 @@ class Collection extends Map { * Functionally identical shortcut to `collection.array().map(...)`. * @param {function} callback Function that produces an element of the new Array, taking three arguments * @param {*} [thisArg] Optional. Value to use as this when executing callback. - * @returns {*[]} + * @returns {array} */ map(...args) { return this.array().map(...args); From 9c915d1e0a4bb3fcdc0a022b9ef3aaf3f1556bd7 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 4 Sep 2016 11:53:30 +0100 Subject: [PATCH 318/324] Fix constants errors not giving a stacktrace --- docs/docs.json | 2 +- src/client/ClientDataResolver.js | 2 +- src/client/ClientManager.js | 2 +- src/client/rest/APIRequest.js | 2 +- src/client/rest/RESTManager.js | 2 +- src/client/websocket/WebSocketManager.js | 4 ++-- src/util/Constants.js | 14 +++++++------- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index c30b5183d..2bb8c3743 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472985580690},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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":138,"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":174,"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"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":75,"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":80,"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":85,"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":90,"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":95,"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":100,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":105,"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":199,"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":208,"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: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:guildRoleUpdated","name":"guildRoleUpdated","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":35,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":33,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"The client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"The client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":57,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence 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":64,"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":50,"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":57,"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:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":183,"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":193,"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":235,"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":86,"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":109,"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":194,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":208,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":225,"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":233,"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":241,"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":248,"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":255,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":217,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":136,"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":144,"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":157,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":91,"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":101,"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":109,"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":91,"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.log);"],"meta":{"line":215,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":233,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":252,"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":31,"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":36,"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":41,"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":52,"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":78,"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":115,"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":139,"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":191,"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":"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.log); // log error"],"meta":{"line":43,"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":22,"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":[]}],"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online` or `idle`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":[]}],"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":76,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":64,"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",""]]]}}]}],"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":[]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":63,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":77,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":82,"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":87,"file":"GroupDMChannel.js","path":"src/structures"},"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":92,"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":97,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":13,"file":"Guild.js","path":"src/structures"},"methods":[{"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":140,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":152,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":352,"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":365,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":378,"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.log);"],"meta":{"line":391,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"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.log);"],"meta":{"line":408,"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.log);"],"meta":{"line":422,"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.log);"],"meta":{"line":436,"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.log);"],"meta":{"line":450,"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.log);"],"meta":{"line":464,"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.log);"],"meta":{"line":478,"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.log);"],"meta":{"line":492,"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.log);"],"meta":{"line":506,"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.log);"],"meta":{"line":520,"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#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":534,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"member","description":"The member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":542,"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":550,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"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":560,"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#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":605,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":19,"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":25,"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":31,"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":37,"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":46,"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":51,"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":216,"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":221,"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":226,"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":231,"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":236,"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":242,"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":247,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":252,"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":260,"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":265,"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":270,"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":275,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":337,"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":588,"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":598,"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#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":54,"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#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":81,"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.log);"],"meta":{"line":155,"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.log);"],"meta":{"line":205,"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.log);"],"meta":{"line":219,"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.log);"],"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":268,"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#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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":22,"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":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":143,"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":152,"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":161,"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":170,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":179,"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#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":188,"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#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":196,"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":204,"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":217,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":35,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":66,"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":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"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":107,"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":116,"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":125,"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":134,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":286,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":375,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":327,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":332,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":358,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":379,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"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":214,"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#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.log);"],"meta":{"line":246,"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#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":266,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":290,"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":298,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":29,"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":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":43,"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":50,"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":56,"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":68,"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":73,"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":78,"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":89,"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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":99,"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":130,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"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#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":15,"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":24,"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":29,"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":34,"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":39,"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":45,"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":52,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":60,"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":66,"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":75,"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":80,"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":85,"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":90,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":97,"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":103,"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":112,"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":117,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":33,"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":79,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":93,"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.log);"],"meta":{"line":107,"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.log);"],"meta":{"line":121,"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.log);"],"meta":{"line":135,"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.log);"],"meta":{"line":149,"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.log);"],"meta":{"line":163,"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#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":174,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":195,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The name of the permission to test","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":205,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":37,"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":42,"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":47,"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":52,"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":57,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":62,"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":67,"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":214,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"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":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":24,"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":33,"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":43,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"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":53,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":87,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":106,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"The key to filter by","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":118,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"Function used to filter (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]}],"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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"}},{"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":56,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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":96,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":113,"file":"ClientDataResolver.js","path":"src/client"}},{"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","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":131,"file":"ClientDataResolver.js","path":"src/client"}},{"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":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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":168,"file":"ClientDataResolver.js","path":"src/client"}},{"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":131,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":251,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":98,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":217,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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":287,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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":12,"date":1472986427959},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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":138,"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":174,"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"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":75,"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":80,"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":85,"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":90,"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":95,"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":100,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":105,"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":199,"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":208,"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: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:guildRoleUpdated","name":"guildRoleUpdated","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":35,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":33,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"The client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"The client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":57,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence 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":64,"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":50,"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":57,"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:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":183,"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":193,"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":235,"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":86,"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":109,"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":194,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":208,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":225,"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":233,"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":241,"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":248,"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":255,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":217,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":136,"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":144,"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":157,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":91,"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":101,"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":109,"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":91,"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.log);"],"meta":{"line":215,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":233,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":252,"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":31,"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":36,"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":41,"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":52,"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":78,"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":115,"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":139,"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":191,"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":"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.log); // log error"],"meta":{"line":43,"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":22,"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":[]}],"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online` or `idle`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":[]}],"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":76,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":64,"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",""]]]}}]}],"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":[]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":63,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":77,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":82,"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":87,"file":"GroupDMChannel.js","path":"src/structures"},"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":92,"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":97,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":13,"file":"Guild.js","path":"src/structures"},"methods":[{"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":140,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":152,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":352,"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":365,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":378,"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.log);"],"meta":{"line":391,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"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.log);"],"meta":{"line":408,"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.log);"],"meta":{"line":422,"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.log);"],"meta":{"line":436,"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.log);"],"meta":{"line":450,"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.log);"],"meta":{"line":464,"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.log);"],"meta":{"line":478,"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.log);"],"meta":{"line":492,"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.log);"],"meta":{"line":506,"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.log);"],"meta":{"line":520,"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#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":534,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"member","description":"The member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":542,"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":550,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"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":560,"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#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":605,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":19,"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":25,"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":31,"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":37,"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":46,"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":51,"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":216,"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":221,"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":226,"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":231,"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":236,"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":242,"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":247,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":252,"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":260,"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":265,"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":270,"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":275,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":337,"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":588,"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":598,"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#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":54,"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#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":81,"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.log);"],"meta":{"line":155,"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.log);"],"meta":{"line":205,"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.log);"],"meta":{"line":219,"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.log);"],"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":268,"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#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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":22,"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":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":143,"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":152,"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":161,"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":170,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":179,"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#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":188,"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#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":196,"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":204,"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":217,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":35,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":66,"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":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"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":107,"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":116,"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":125,"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":134,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":286,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":375,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":327,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":332,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":358,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":379,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"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":214,"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#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.log);"],"meta":{"line":246,"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#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":266,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":290,"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":298,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":29,"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":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":43,"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":50,"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":56,"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":68,"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":73,"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":78,"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":89,"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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":99,"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":130,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"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#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":15,"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":24,"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":29,"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":34,"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":39,"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":45,"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":52,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":60,"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":66,"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":75,"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":80,"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":85,"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":90,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":97,"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":103,"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":112,"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":117,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":33,"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":79,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":93,"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.log);"],"meta":{"line":107,"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.log);"],"meta":{"line":121,"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.log);"],"meta":{"line":135,"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.log);"],"meta":{"line":149,"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.log);"],"meta":{"line":163,"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#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":174,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":195,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The name of the permission to test","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":205,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":37,"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":42,"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":47,"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":52,"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":57,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":62,"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":67,"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":214,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"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":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":24,"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":33,"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":43,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"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":53,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":87,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":106,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"The key to filter by","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":118,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"Function used to filter (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]}],"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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"}},{"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":56,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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":96,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":113,"file":"ClientDataResolver.js","path":"src/client"}},{"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","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":131,"file":"ClientDataResolver.js","path":"src/client"}},{"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":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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":168,"file":"ClientDataResolver.js","path":"src/client"}},{"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":131,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":251,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":98,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":217,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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":287,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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/ClientDataResolver.js b/src/client/ClientDataResolver.js index d7487a3bb..b93a40382 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -142,7 +142,7 @@ class ClientDataResolver { */ resolvePermission(permission) { if (typeof permission === 'string') permission = Constants.PermissionFlags[permission]; - if (!permission) throw Constants.Errors.NOT_A_PERMISSION; + if (!permission) throw new Error(Constants.Errors.NOT_A_PERMISSION); return permission; } diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index cf4b26284..5f04379d9 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -30,7 +30,7 @@ class ClientManager { this.client.ws.connect(gateway); this.client.once(Constants.Events.READY, () => resolve(token)); }).catch(reject); - this.client.setTimeout(() => reject(Constants.Errors.TOOK_TOO_LONG), 1000 * 300); + this.client.setTimeout(() => reject(new Error(Constants.Errors.TOOK_TOO_LONG)), 1000 * 300); } /** diff --git a/src/client/rest/APIRequest.js b/src/client/rest/APIRequest.js index e8e9c594f..1c88bc7c1 100644 --- a/src/client/rest/APIRequest.js +++ b/src/client/rest/APIRequest.js @@ -21,7 +21,7 @@ class APIRequest { } else if (this.rest.client.token) { return this.rest.client.token; } - throw Constants.Errors.NO_TOKEN; + throw new Error(Constants.Errors.NO_TOKEN); } gen() { diff --git a/src/client/rest/RESTManager.js b/src/client/rest/RESTManager.js index 9af4712da..a2c11dd94 100644 --- a/src/client/rest/RESTManager.js +++ b/src/client/rest/RESTManager.js @@ -29,7 +29,7 @@ class RESTManager { case 'sequential': return SequentialRequestHandler; default: - throw Constants.Errors.INVALID_RATE_LIMIT_METHOD; + throw new Error(Constants.Errors.INVALID_RATE_LIMIT_METHOD); } } diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 7bdf08294..87d2c5ae0 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -150,7 +150,7 @@ class WebSocketManager { * @param {Object} event The received websocket data */ eventClose(event) { - if (event.code === 4004) throw Constants.Errors.BAD_LOGIN; + if (event.code === 4004) throw new Error(Constants.Errors.BAD_LOGIN); if (!this.reconnecting && event.code !== 1000) this.tryReconnect(); } @@ -166,7 +166,7 @@ class WebSocketManager { if (event.binary) event.data = zlib.inflateSync(event.data).toString(); packet = JSON.parse(event.data); } catch (e) { - return this.eventError(Constants.Errors.BAD_WS_MESSAGE); + return this.eventError(new Error(Constants.Errors.BAD_WS_MESSAGE)); } this.client.emit('raw', packet); diff --git a/src/util/Constants.js b/src/util/Constants.js index fbf359937..6cff27244 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -63,13 +63,13 @@ exports.ChannelTypes = { exports.Package = require('../../package.json'); exports.Errors = { - NO_TOKEN: new Error('request to use token, but token was unavailable to the client'), - NO_BOT_ACCOUNT: new Error('you should ideally be using a bot account!'), - BAD_WS_MESSAGE: new Error('a bad message was received from the websocket - bad compression or not json'), - TOOK_TOO_LONG: new Error('something took too long to do'), - NOT_A_PERMISSION: new Error('that is not a valid permission string or number'), - INVALID_RATE_LIMIT_METHOD: new Error('unknown rate limiting method'), - BAD_LOGIN: new Error('incorrect login details were provided'), + NO_TOKEN: 'request to use token, but token was unavailable to the client', + NO_BOT_ACCOUNT: 'you should ideally be using a bot account!', + BAD_WS_MESSAGE: 'a bad message was received from the websocket - bad compression or not json', + TOOK_TOO_LONG: 'something took too long to do', + NOT_A_PERMISSION: 'that is not a valid permission string or number', + INVALID_RATE_LIMIT_METHOD: 'unknown rate limiting method', + BAD_LOGIN: 'incorrect login details were provided', }; const API = `https://discordapp.com/api/v${exports.DefaultOptions.protocol_version}`; From 1155c482f1e49e24c01f930e43a6405797137c25 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 4 Sep 2016 11:55:17 +0100 Subject: [PATCH 319/324] make client.readyTime a date --- docs/docs.json | 2 +- src/client/Client.js | 4 ++-- src/client/websocket/packets/handlers/Ready.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 2bb8c3743..81400c4c9 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472986427959},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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":138,"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":174,"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"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":75,"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":80,"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":85,"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":90,"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":95,"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":100,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":105,"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":199,"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":208,"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: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:guildRoleUpdated","name":"guildRoleUpdated","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":35,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":33,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"The client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"The client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":57,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence 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":64,"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":50,"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":57,"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:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":183,"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":193,"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":235,"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":86,"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":109,"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":194,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":208,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":225,"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":233,"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":241,"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":248,"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":255,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":217,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":136,"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":144,"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":157,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":91,"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":101,"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":109,"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":91,"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.log);"],"meta":{"line":215,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":233,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":252,"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":31,"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":36,"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":41,"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":52,"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":78,"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":115,"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":139,"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":191,"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":"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.log); // log error"],"meta":{"line":43,"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":22,"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":[]}],"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online` or `idle`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":[]}],"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":76,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":64,"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",""]]]}}]}],"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":[]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":63,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":77,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":82,"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":87,"file":"GroupDMChannel.js","path":"src/structures"},"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":92,"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":97,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":13,"file":"Guild.js","path":"src/structures"},"methods":[{"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":140,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":152,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":352,"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":365,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":378,"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.log);"],"meta":{"line":391,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"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.log);"],"meta":{"line":408,"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.log);"],"meta":{"line":422,"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.log);"],"meta":{"line":436,"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.log);"],"meta":{"line":450,"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.log);"],"meta":{"line":464,"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.log);"],"meta":{"line":478,"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.log);"],"meta":{"line":492,"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.log);"],"meta":{"line":506,"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.log);"],"meta":{"line":520,"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#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":534,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"member","description":"The member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":542,"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":550,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"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":560,"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#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":605,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":19,"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":25,"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":31,"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":37,"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":46,"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":51,"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":216,"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":221,"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":226,"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":231,"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":236,"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":242,"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":247,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":252,"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":260,"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":265,"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":270,"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":275,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":337,"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":588,"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":598,"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#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":54,"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#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":81,"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.log);"],"meta":{"line":155,"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.log);"],"meta":{"line":205,"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.log);"],"meta":{"line":219,"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.log);"],"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":268,"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#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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":22,"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":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":143,"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":152,"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":161,"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":170,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":179,"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#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":188,"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#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":196,"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":204,"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":217,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":35,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":66,"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":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"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":107,"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":116,"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":125,"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":134,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":286,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":375,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":327,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":332,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":358,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":379,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"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":214,"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#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.log);"],"meta":{"line":246,"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#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":266,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":290,"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":298,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":29,"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":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":43,"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":50,"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":56,"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":68,"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":73,"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":78,"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":89,"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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":99,"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":130,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"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#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":15,"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":24,"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":29,"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":34,"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":39,"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":45,"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":52,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":60,"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":66,"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":75,"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":80,"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":85,"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":90,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":97,"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":103,"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":112,"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":117,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":33,"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":79,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":93,"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.log);"],"meta":{"line":107,"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.log);"],"meta":{"line":121,"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.log);"],"meta":{"line":135,"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.log);"],"meta":{"line":149,"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.log);"],"meta":{"line":163,"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#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":174,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":195,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The name of the permission to test","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":205,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":37,"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":42,"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":47,"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":52,"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":57,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":62,"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":67,"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":214,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"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":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":24,"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":33,"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":43,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"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":53,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":87,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":106,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"The key to filter by","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":118,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"Function used to filter (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]}],"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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"}},{"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":56,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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":96,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":113,"file":"ClientDataResolver.js","path":"src/client"}},{"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","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":131,"file":"ClientDataResolver.js","path":"src/client"}},{"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":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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":168,"file":"ClientDataResolver.js","path":"src/client"}},{"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":131,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":251,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":98,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":217,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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":287,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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":12,"date":1472986523094},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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":138,"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":174,"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"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":75,"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":80,"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":85,"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":90,"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":95,"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":100,"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":105,"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":199,"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":208,"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: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:guildRoleUpdated","name":"guildRoleUpdated","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":35,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":33,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"The client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"The client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":57,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence 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":64,"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":50,"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":57,"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:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":183,"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":193,"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":235,"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":86,"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":109,"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":194,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":208,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":225,"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":233,"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":241,"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":248,"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":255,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":217,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":136,"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":144,"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":157,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":91,"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":101,"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":109,"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":91,"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.log);"],"meta":{"line":215,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":233,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":252,"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":31,"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":36,"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":41,"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":52,"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":78,"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":115,"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":139,"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":191,"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":"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.log); // log error"],"meta":{"line":43,"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":22,"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":[]}],"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online` or `idle`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":[]}],"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":76,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":64,"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",""]]]}}]}],"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":[]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":63,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":77,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":82,"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":87,"file":"GroupDMChannel.js","path":"src/structures"},"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":92,"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":97,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":13,"file":"Guild.js","path":"src/structures"},"methods":[{"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":140,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":152,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":352,"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":365,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":378,"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.log);"],"meta":{"line":391,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"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.log);"],"meta":{"line":408,"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.log);"],"meta":{"line":422,"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.log);"],"meta":{"line":436,"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.log);"],"meta":{"line":450,"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.log);"],"meta":{"line":464,"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.log);"],"meta":{"line":478,"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.log);"],"meta":{"line":492,"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.log);"],"meta":{"line":506,"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.log);"],"meta":{"line":520,"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#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":534,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"member","description":"The member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":542,"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":550,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"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":560,"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#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":605,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":19,"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":25,"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":31,"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":37,"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":46,"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":51,"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":216,"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":221,"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":226,"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":231,"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":236,"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":242,"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":247,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":252,"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":260,"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":265,"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":270,"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":275,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":337,"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":588,"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":598,"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#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":54,"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#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":81,"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.log);"],"meta":{"line":155,"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.log);"],"meta":{"line":205,"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.log);"],"meta":{"line":219,"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.log);"],"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":268,"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#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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":22,"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":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":143,"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":152,"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":161,"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":170,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":179,"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#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":188,"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#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":196,"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":204,"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":217,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":35,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":66,"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":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"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":107,"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":116,"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":125,"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":134,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":286,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":375,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":327,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":332,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":358,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":379,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"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":214,"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#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.log);"],"meta":{"line":246,"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#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":266,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":290,"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":298,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":29,"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":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":43,"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":50,"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":56,"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":68,"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":73,"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":78,"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":89,"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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":99,"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":130,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"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#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":15,"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":24,"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":29,"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":34,"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":39,"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":45,"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":52,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":60,"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":66,"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":75,"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":80,"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":85,"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":90,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":97,"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":103,"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":112,"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":117,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":33,"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":79,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":93,"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.log);"],"meta":{"line":107,"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.log);"],"meta":{"line":121,"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.log);"],"meta":{"line":135,"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.log);"],"meta":{"line":149,"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.log);"],"meta":{"line":163,"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#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":174,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":195,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The name of the permission to test","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":205,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":37,"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":42,"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":47,"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":52,"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":57,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":62,"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":67,"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":214,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"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":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":24,"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":33,"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":43,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"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":53,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":87,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":106,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"The key to filter by","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":118,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"Function used to filter (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]}],"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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"}},{"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":56,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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":96,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":113,"file":"ClientDataResolver.js","path":"src/client"}},{"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","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":131,"file":"ClientDataResolver.js","path":"src/client"}},{"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":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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":168,"file":"ClientDataResolver.js","path":"src/client"}},{"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":131,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":251,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":98,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":217,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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":287,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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 368f5163f..4177a3755 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -99,8 +99,8 @@ class Client extends EventEmitter { */ this.password = null; /** - * The time in milliseconds the Client connected - * @type {?number} + * The date at which the Client was regarded as being in the `READY` state. + * @type {?Date} */ this.readyTime = null; this._intervals = []; diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index 7cbb46784..0c3804e27 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 = Date.now(); + client.readyTime = new Date(); client.users.set(clientUser.id, clientUser); for (const guild of data.guilds) client.dataManager.newGuild(guild); From 89145b121d6b33911ddff82abf7405044f31661d Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 4 Sep 2016 12:15:33 +0100 Subject: [PATCH 320/324] add info to Guild --- docs/docs.json | 2 +- src/structures/Guild.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 81400c4c9..e69874347 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472986523094},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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":138,"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":174,"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"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":75,"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":80,"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":85,"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":90,"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":95,"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":100,"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":105,"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":199,"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":208,"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: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:guildRoleUpdated","name":"guildRoleUpdated","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":35,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":33,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"The client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"The client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":57,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence 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":64,"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":50,"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":57,"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:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":183,"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":193,"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":235,"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":86,"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":109,"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":194,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":208,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":225,"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":233,"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":241,"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":248,"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":255,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":217,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":136,"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":144,"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":157,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":91,"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":101,"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":109,"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":91,"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.log);"],"meta":{"line":215,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":233,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":252,"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":31,"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":36,"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":41,"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":52,"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":78,"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":115,"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":139,"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":191,"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":"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.log); // log error"],"meta":{"line":43,"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":22,"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":[]}],"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online` or `idle`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":[]}],"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":76,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":64,"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",""]]]}}]}],"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":[]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":63,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":77,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":82,"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":87,"file":"GroupDMChannel.js","path":"src/structures"},"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":92,"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":97,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":13,"file":"Guild.js","path":"src/structures"},"methods":[{"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":140,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":152,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":352,"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":365,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":378,"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.log);"],"meta":{"line":391,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"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.log);"],"meta":{"line":408,"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.log);"],"meta":{"line":422,"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.log);"],"meta":{"line":436,"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.log);"],"meta":{"line":450,"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.log);"],"meta":{"line":464,"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.log);"],"meta":{"line":478,"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.log);"],"meta":{"line":492,"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.log);"],"meta":{"line":506,"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.log);"],"meta":{"line":520,"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#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":534,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"member","description":"The member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":542,"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":550,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"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":560,"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#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":605,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":19,"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":25,"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":31,"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":37,"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":46,"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":51,"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":216,"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":221,"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":226,"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":231,"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":236,"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":242,"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":247,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":252,"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":260,"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":265,"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":270,"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":275,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":337,"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":588,"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":598,"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#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":54,"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#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":81,"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.log);"],"meta":{"line":155,"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.log);"],"meta":{"line":205,"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.log);"],"meta":{"line":219,"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.log);"],"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":268,"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#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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":22,"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":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":143,"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":152,"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":161,"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":170,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":179,"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#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":188,"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#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":196,"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":204,"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":217,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":35,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":66,"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":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"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":107,"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":116,"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":125,"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":134,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":286,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":375,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":327,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":332,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":358,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":379,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"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":214,"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#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.log);"],"meta":{"line":246,"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#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":266,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":290,"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":298,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":29,"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":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":43,"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":50,"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":56,"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":68,"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":73,"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":78,"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":89,"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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":99,"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":130,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"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#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":15,"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":24,"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":29,"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":34,"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":39,"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":45,"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":52,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":60,"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":66,"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":75,"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":80,"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":85,"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":90,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":97,"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":103,"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":112,"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":117,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":33,"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":79,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":93,"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.log);"],"meta":{"line":107,"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.log);"],"meta":{"line":121,"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.log);"],"meta":{"line":135,"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.log);"],"meta":{"line":149,"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.log);"],"meta":{"line":163,"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#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":174,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":195,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The name of the permission to test","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":205,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":37,"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":42,"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":47,"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":52,"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":57,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":62,"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":67,"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":214,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"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":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":24,"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":33,"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":43,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"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":53,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":87,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":106,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"The key to filter by","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":118,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"Function used to filter (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]}],"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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"}},{"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":56,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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":96,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":113,"file":"ClientDataResolver.js","path":"src/client"}},{"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","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":131,"file":"ClientDataResolver.js","path":"src/client"}},{"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":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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":168,"file":"ClientDataResolver.js","path":"src/client"}},{"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":131,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":251,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":98,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":217,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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":287,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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":12,"date":1472987739514},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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":138,"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":174,"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"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":75,"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":80,"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":85,"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":90,"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":95,"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":100,"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":105,"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":199,"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":208,"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: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:guildRoleUpdated","name":"guildRoleUpdated","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":35,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":33,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"The client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"The client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":57,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence 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":64,"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":50,"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":57,"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:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":183,"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":193,"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":235,"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":88,"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":111,"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":196,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":208,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":225,"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":233,"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":241,"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":248,"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":255,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":217,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":136,"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":144,"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":157,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":91,"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":101,"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":109,"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":91,"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.log);"],"meta":{"line":215,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":233,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":252,"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":31,"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":36,"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":41,"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":52,"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":78,"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":115,"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":139,"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":191,"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":"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.log); // log error"],"meta":{"line":43,"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":22,"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":[]}],"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online` or `idle`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":[]}],"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":76,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":64,"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",""]]]}}]}],"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":[]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":63,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":77,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":82,"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":87,"file":"GroupDMChannel.js","path":"src/structures"},"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":92,"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":97,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":15,"file":"Guild.js","path":"src/structures"},"methods":[{"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":142,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"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":165,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"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.log);"],"meta":{"line":424,"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.log);"],"meta":{"line":438,"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.log);"],"meta":{"line":452,"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.log);"],"meta":{"line":466,"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.log);"],"meta":{"line":480,"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.log);"],"meta":{"line":494,"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.log);"],"meta":{"line":508,"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.log);"],"meta":{"line":522,"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#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":536,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"member","description":"The member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":544,"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":552,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"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":562,"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#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":607,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":21,"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":27,"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":33,"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":39,"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":48,"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":53,"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":218,"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":223,"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":228,"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":233,"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":238,"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":244,"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":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":254,"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":262,"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":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":339,"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":590,"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":600,"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#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":54,"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#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":81,"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.log);"],"meta":{"line":155,"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.log);"],"meta":{"line":205,"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.log);"],"meta":{"line":219,"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.log);"],"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":268,"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#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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":22,"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":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":143,"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":152,"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":161,"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":170,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":179,"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#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":188,"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#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":196,"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":204,"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":217,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":35,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":66,"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":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"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":107,"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":116,"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":125,"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":134,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":286,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":375,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":327,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":332,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":358,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":379,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"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":214,"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#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.log);"],"meta":{"line":246,"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#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":266,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":290,"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":298,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":29,"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":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":43,"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":50,"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":56,"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":68,"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":73,"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":78,"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":89,"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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":99,"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":130,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"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#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":15,"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":24,"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":29,"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":34,"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":39,"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":45,"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":52,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":60,"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":66,"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":75,"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":80,"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":85,"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":90,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":97,"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":103,"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":112,"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":117,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":33,"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":79,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":93,"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.log);"],"meta":{"line":107,"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.log);"],"meta":{"line":121,"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.log);"],"meta":{"line":135,"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.log);"],"meta":{"line":149,"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.log);"],"meta":{"line":163,"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#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":174,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":195,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The name of the permission to test","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":205,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":37,"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":42,"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":47,"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":52,"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":57,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":62,"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":67,"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":214,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"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":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":24,"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":33,"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":43,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"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":53,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":87,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":106,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"The key to filter by","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":118,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"Function used to filter (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]}],"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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"}},{"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":56,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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":96,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":113,"file":"ClientDataResolver.js","path":"src/client"}},{"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","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":131,"file":"ClientDataResolver.js","path":"src/client"}},{"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":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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":168,"file":"ClientDataResolver.js","path":"src/client"}},{"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":131,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":251,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":98,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":217,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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":287,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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/Guild.js b/src/structures/Guild.js index 374996eab..59d1fb5e7 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -9,6 +9,8 @@ const arraysEqual = require('../util/ArraysEqual'); /** * Represents a Guild (or a Server) on Discord. + * It's recommended to see if a guild is available before performing operations or reading data from it. You can + * check this with `guild.available`. */ class Guild { constructor(client, data) { From b1a25bd17623169102e8d85b6207a8ea43d20569 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 4 Sep 2016 12:21:02 +0100 Subject: [PATCH 321/324] Add sharding manager --- docs/docs.json | 2 +- src/sharding/Shard.js | 39 +-------------------------------- src/sharding/ShardListener.js | 28 ----------------------- src/sharding/ShardingManager.js | 1 - 4 files changed, 2 insertions(+), 68 deletions(-) delete mode 100644 src/sharding/ShardListener.js diff --git a/docs/docs.json b/docs/docs.json index 55561c5f7..c2471ccfd 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472580433124},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","description":"Creates an instance of Client.","memberof":"Client","params":[{"name":"options","description":"options to pass to 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":131,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["String",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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. Resolves with null if successful.","memberof":"Client","meta":{"line":144,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[]},{"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":178,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["String",", "],["User",">"]]]},"meta":{"line":72,"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":77,"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":82,"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":87,"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":92,"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":97,"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":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The time in milliseconds the Client connected","memberof":"Client","type":{"types":[[["Number",""]]]},"meta":{"line":107,"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":188,"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":31,"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:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":46,"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":32,"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":43,"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:guildRoleUpdated","name":"guildRoleUpdated","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":36,"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":38,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":36,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"the client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"the client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":20,"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":20,"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":29,"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":22,"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":16,"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":19,"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":26,"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":19,"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":19,"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 a messages are deleted in bulk","memberof":"Client","meta":{"line":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"the user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"the user after the presence 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":74,"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":52,"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":60,"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":48,"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 before the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":193,"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":203,"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":246,"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":102,"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":132,"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":219,"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.","meta":{"line":11,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":177,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":185,"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":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":26,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":106,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"error","description":"the error encountered","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":129,"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.","meta":{"line":12,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"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":53,"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":72,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":26,"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":89,"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":97,"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":108,"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","meta":{"line":12,"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":87,"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.log);"],"meta":{"line":221,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"filepath","description":"the path to the file","type":{"types":[[["String",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Play the given stream in the voice connection","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":239,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"the audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playPCMStream","name":"playPCMStream","description":"Plays a stream of PCM data","memberof":"VoiceConnection","meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"pcmStream","description":"the PCM stream","type":{"types":[[["ReadableStream",""]]]}}]},{"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":258,"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":25,"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":30,"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":35,"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":46,"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":73,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"the 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":140,"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":194,"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":"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.log); // log error"],"meta":{"line":47,"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":24,"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":35,"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",", "],["Error",">"]]]},"params":[{"name":"status","description":"the status, can be `online` or `idle`.","optional":true,"type":{"types":[[["String",""]]]}},{"name":"game","description":"the game that is being played","optional":true,"type":{"types":[[["String",""]],[["Object",""]]]}}]},{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["Boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"DMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["String",""]]]},"meta":{"line":29,"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#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":24,"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":35,"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":78,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":66,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"GroupDMChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":82,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":95,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["String",""]]]},"meta":{"line":100,"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":105,"file":"GroupDMChannel.js","path":"src/structures"},"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":110,"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":115,"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#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":24,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.","meta":{"line":27,"file":"Guild.js","path":"src/structures"},"methods":[{"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":163,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":175,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"the user that you want to obtain the GuildMember of.","type":{"types":[[["UserResolvable",""]]]}}]},{"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":186,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"guild","description":"the guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":376,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel","), "],["Error",">"]]]},"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":415,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":432,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":446,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":460,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":474,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":516,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"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.log);"],"meta":{"line":544,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"splash","description":"the new splash screen of the guild.","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":558,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",", "],["Error",">"]]]},"params":[{"name":"member","description":"the member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":566,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["User",">, "],["Error",">"]]]},"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":574,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Invite",">, "],["Error",">"]]]},"params":[]},{"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":584,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",", "],["Error",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["String",""]]]}}]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":33,"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":39,"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":45,"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":51,"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":62,"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":67,"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":242,"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":247,"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":252,"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":257,"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":262,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":282,"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":290,"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":295,"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":300,"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":305,"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":319,"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":611,"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":27,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"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":68,"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#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":101,"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.log);"],"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"meta":{"line":233,"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.log);"],"meta":{"line":247,"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.log);"],"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":47,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":24,"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":35,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":7,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":144,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":153,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":162,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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":171,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"roles","description":"the roles to apply","type":{"types":[[["Collection",".<"],["String",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":180,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"nick","description":"the nickname for the Guild Member","type":{"types":[[["String",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":189,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"params":[{"name":"data","description":"the data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DM's with this Guild Member","memberof":"GuildMember","meta":{"line":197,"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":205,"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":218,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",", "],["Error",">"]]]},"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#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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":13,"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":18,"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":23,"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":36,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":66,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["Boolean",""]]]},"meta":{"line":71,"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":76,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember","memberof":"GuildMember","type":{"types":[[["Array",".<"],["Role",">"]]]},"meta":{"line":85,"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":108,"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":117,"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":126,"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":135,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":100,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":55,"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":61,"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":67,"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":73,"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":79,"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":86,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":7,"file":"Message.js","path":"src/structures"},"methods":[{"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":235,"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#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.log);"],"meta":{"line":270,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["Number",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":290,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the new content of a message","type":{"types":[[["String",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":305,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[{"name":"content","description":"the content of the message","type":{"types":[[["String",""]]]}},{"name":"options","description":"the options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":314,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":322,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",", "],["Error",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["Channel",""]]]},"meta":{"line":14,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":28,"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":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":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":55,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":67,"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":72,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentionEveryone","name":"mentionEveryone","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"types":[[["Boolean",""]]]},"meta":{"line":77,"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":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":87,"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":92,"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":104,"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, maps their ID to the channel object.","type":{"types":[[["Collection",".<"],["String",", "],["GuildChannel",">"]]]}}]},{"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":113,"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":148,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":4,"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":10,"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":19,"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":24,"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":29,"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":34,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":41,"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":47,"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":56,"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":61,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":68,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":74,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":79,"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":88,"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":93,"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":98,"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":103,"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":109,"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":116,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":35,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",", "],["Error",">"]]]},"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["String",""]]]},"meta":{"line":21,"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":26,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":83,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[]},{"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.log);"],"meta":{"line":97,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":111,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":125,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":139,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":153,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"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.log);"],"meta":{"line":167,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",", "],["Error",">"]]]},"params":[{"name":"permissions","description":"the permissions of the role","type":{"types":[[["Array",".<"],["String",">"]]]}}]},{"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":178,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["String",", "],["Boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":200,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"permission","description":"the name of the permission to test","type":{"types":[[["String",""]]]}},{"name":"explicit","description":"whether or not the inclusion of the permission is explicit","optional":true,"type":{"types":[[["Boolean",""]]]}}]},{"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":222,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":41,"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":46,"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":51,"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":56,"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":61,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["Number",""]]]},"meta":{"line":66,"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":71,"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":231,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#getMessages"]},{"id":"TextChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}],"implements":["TextBasedChannel#setTyping"]},{"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",">, "],["Error",">"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":65,"file":"User.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"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":85,"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":95,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Boolean",""]]]},"params":[{"name":"user","description":"the user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":21,"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#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":31,"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":36,"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":41,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["String",""]]]},"meta":{"line":55,"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":74,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",", "],["Error",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":67,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":68,"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#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":101,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":181,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["null",", "],["Error",">"]]]},"params":[{"name":"userOrRole","description":"the user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"config","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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":233,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":247,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":261,"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#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":275,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["String",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":296,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"options","description":"the options to provide when creating the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["String",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["String",""]]]},"meta":{"line":38,"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":43,"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":48,"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":54,"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":14,"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","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":25,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection.","memberof":"Collection","meta":{"line":33,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection.","memberof":"Collection","meta":{"line":42,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[]},{"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":52,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Object",">"]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":97,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":116,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Object",""]]]},"params":[{"name":"key","description":"the key to filter by","type":{"types":[[["String",""]]]}},{"name":"value","description":"the expected value","type":{"types":[[["any",""]]]}}]},{"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":132,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"the callback used to filter","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]}],"properties":[{"id":"Collection#length","name":"length","description":"The length (size) of this collection.","memberof":"Collection","type":{"types":[[["Number",""]]]},"meta":{"line":67,"file":"Collection.js","path":"src/util"},"props":[]}],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":9,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["String",", "],["Message",">"]]]},"params":[{"name":"messages","description":"the messages to delete","type":{"types":[[["Map",".<"],["String",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"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.log);"],"meta":{"line":55,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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.log);"],"meta":{"line":69,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"the content to send","type":{"types":[[["String",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["String",""]]]}}]},{"id":"TextBasedChannel#getMessages","name":"getMessages","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.getMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.log);"],"meta":{"line":123,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["String",", "],["Message",">, "],["Error",">"]]]},"params":[{"name":"options","description":"the query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#setTyping","name":"setTyping","description":"Starts or stops a typing indicator in the channel.\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.setTyping(true);","// stop typing in a channel\nchannel.setTyping(false);"],"meta":{"line":151,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"typing","description":"whether or not the client user should be typing","type":{"types":[[["Boolean",""]]]}}]},{"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",">, "],["Error",">"]]]},"params":[]}],"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":[]}],"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)","type":{"types":[[["User",""]],[["String",""]],[["Message",""]],[["Guild",""]]]},"meta":{"line":27,"file":"ClientDataResolver.js","path":"src/client"}},{"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":55,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["String",""]]]},"meta":{"line":122,"file":"ClientDataResolver.js","path":"src/client"}},{"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 object","type":{"types":[[["String",""]],[["Array",""]],[["Object",""]]]},"meta":{"line":146,"file":"ClientDataResolver.js","path":"src/client"}},{"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* An URL","type":{"types":[[["String",""]],[["Buffer",""]]]},"meta":{"line":171,"file":"ClientDataResolver.js","path":"src/client"}},{"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":157,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":279,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":34,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":99,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been written completely from scratch and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these."}],"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```"}]}} \ No newline at end of file +{"meta":{"version":12,"date":1472988067504},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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":138,"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":174,"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"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":75,"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":80,"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":85,"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":90,"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":95,"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":100,"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":105,"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":199,"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":208,"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: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:guildRoleUpdated","name":"guildRoleUpdated","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":35,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":33,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"The client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"The client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":57,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence 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":64,"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":50,"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":57,"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:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":182,"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":192,"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":234,"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":88,"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":111,"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":196,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":208,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":225,"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":233,"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":241,"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":248,"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":255,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":217,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":136,"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":144,"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":157,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":91,"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":101,"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":109,"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":91,"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.log);"],"meta":{"line":215,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":233,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":252,"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":31,"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":36,"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":41,"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":52,"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":78,"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":115,"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":139,"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":191,"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":"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.log); // log error"],"meta":{"line":43,"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":22,"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":[]}],"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online` or `idle`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":[]}],"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":76,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":64,"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",""]]]}}]}],"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":[]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":63,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":77,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":82,"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":87,"file":"GroupDMChannel.js","path":"src/structures"},"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":92,"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":97,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":15,"file":"Guild.js","path":"src/structures"},"methods":[{"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":142,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"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":165,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"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.log);"],"meta":{"line":424,"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.log);"],"meta":{"line":438,"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.log);"],"meta":{"line":452,"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.log);"],"meta":{"line":466,"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.log);"],"meta":{"line":480,"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.log);"],"meta":{"line":494,"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.log);"],"meta":{"line":508,"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.log);"],"meta":{"line":522,"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#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":536,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"member","description":"The member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":544,"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":552,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"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":562,"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#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":607,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":21,"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":27,"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":33,"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":39,"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":48,"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":53,"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":218,"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":223,"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":228,"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":233,"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":238,"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":244,"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":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":254,"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":262,"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":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":339,"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":590,"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":600,"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#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":54,"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#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":81,"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.log);"],"meta":{"line":155,"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.log);"],"meta":{"line":205,"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.log);"],"meta":{"line":219,"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.log);"],"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":268,"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#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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":22,"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":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":143,"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":152,"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":161,"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":170,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":179,"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#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":188,"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#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":196,"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":204,"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":217,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":35,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":66,"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":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"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":107,"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":116,"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":125,"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":134,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":286,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":375,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":327,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":332,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":358,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":379,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"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":214,"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#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.log);"],"meta":{"line":246,"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#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":266,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":290,"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":298,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":29,"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":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":43,"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":50,"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":56,"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":68,"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":73,"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":78,"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":89,"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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":99,"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":130,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"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#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":15,"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":24,"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":29,"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":34,"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":39,"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":45,"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":52,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":60,"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":66,"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":75,"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":80,"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":85,"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":90,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":97,"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":103,"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":112,"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":117,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":33,"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":79,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":93,"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.log);"],"meta":{"line":107,"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.log);"],"meta":{"line":121,"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.log);"],"meta":{"line":135,"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.log);"],"meta":{"line":149,"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.log);"],"meta":{"line":163,"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#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":174,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":195,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The name of the permission to test","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":205,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":37,"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":42,"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":47,"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":52,"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":57,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":62,"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":67,"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":214,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"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":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":24,"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":33,"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":43,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"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":53,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":87,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":106,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"The key to filter by","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":118,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"Function used to filter (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]}],"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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"}},{"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":56,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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":96,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":113,"file":"ClientDataResolver.js","path":"src/client"}},{"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","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":131,"file":"ClientDataResolver.js","path":"src/client"}},{"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":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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":168,"file":"ClientDataResolver.js","path":"src/client"}},{"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":131,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":251,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":98,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":217,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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":287,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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 57be609e1..340e7f3ae 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -1,48 +1,11 @@ const childProcess = require('child_process'); const path = require('path'); -const crypto = require('crypto'); class Shard { constructor(manager, id) { this.manager = manager; this.id = id; - this.process = childProcess.fork(path.resolve(this.manager.file), [id, this.manager.shards.size], { silent: true }); - this.waitingForResponse = new Map(); - this.process.on('message', m => { - if (m && m.type && m.id) { - if (this.waitingForResponse.get(m.id)) { - const resp = this.waitingForResponse.get(m.id); - resp.resolve(m.data); - this.waitingForResponse.delete(m.id); - } else { - const reply = data => { - this.send(m.id); - } - } - } - }); - } - - send(type, timeout = 60000, data = {}) { - const id = crypto.randomBytes(16).toString('hex'); - this._send(id, type, timeout, data); - } - - _send(id, type, timeout, data) { - return new Promise((resolve, reject) => { - this.process.send({ - type, - id, - data, - }); - this.waitingForResponse.set(id, { - resolve, - }); - setTimeout(() => { - reject(new Error('did not receive response')); - this.waitingForResponse.delete(id); - }, timeout); - }); + this.process = childProcess.fork(path.resolve(this.manager.file), [id, this.manager.shards.size]); } } diff --git a/src/sharding/ShardListener.js b/src/sharding/ShardListener.js deleted file mode 100644 index 7ee79e6c1..000000000 --- a/src/sharding/ShardListener.js +++ /dev/null @@ -1,28 +0,0 @@ -const crypto = require('crypto'); - -class ShardListener { - constructor() { - this.waitingForResponse = new Map(); - this.process = process; - } - - send(type, timeout = 60000, data = {}) { - return new Promise((resolve, reject) => { - const id = crypto.randomBytes(16).toString('hex'); - this.process.send({ - type, - id, - data, - }); - this.waitingForResponse.set(id, { - resolve, - }); - setTimeout(() => { - reject(new Error('did not receive response')); - this.waitingForResponse.delete(id); - }, timeout); - }); - } -} - -module.exports = ShardListener; diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index ea7bcd1f2..201249c48 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -3,7 +3,6 @@ const path = require('path'); const EventEmitter = require('events').EventEmitter; const Collection = require('../util/Collection'); const Shard = require('./Shard'); -const crypto = require('crypto'); class ShardingManager extends EventEmitter { constructor(file, totalShards) { From f23c07a08e98ea09edaa173ee92792c113231a1d Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 4 Sep 2016 12:27:01 +0100 Subject: [PATCH 322/324] document sharding stuff --- docs/docs.json | 2 +- src/sharding/Shard.js | 3 +++ src/sharding/ShardingManager.js | 22 ++++++++++++++++++++-- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index c2471ccfd..6bcf12135 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472988067504},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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":138,"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":174,"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"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":75,"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":80,"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":85,"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":90,"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":95,"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":100,"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":105,"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":199,"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":208,"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: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:guildRoleUpdated","name":"guildRoleUpdated","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":35,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":33,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"The client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"The client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":57,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence 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":64,"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":50,"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":57,"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:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":182,"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":192,"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":234,"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":88,"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":111,"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":196,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":208,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":225,"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":233,"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":241,"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":248,"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":255,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":217,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":136,"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":144,"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":157,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":91,"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":101,"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":109,"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":91,"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.log);"],"meta":{"line":215,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":233,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":252,"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":31,"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":36,"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":41,"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":52,"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":78,"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":115,"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":139,"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":191,"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":"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.log); // log error"],"meta":{"line":43,"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":22,"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":[]}],"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online` or `idle`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":[]}],"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":76,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":64,"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",""]]]}}]}],"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":[]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":63,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":77,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":82,"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":87,"file":"GroupDMChannel.js","path":"src/structures"},"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":92,"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":97,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":15,"file":"Guild.js","path":"src/structures"},"methods":[{"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":142,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"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":165,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"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.log);"],"meta":{"line":424,"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.log);"],"meta":{"line":438,"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.log);"],"meta":{"line":452,"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.log);"],"meta":{"line":466,"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.log);"],"meta":{"line":480,"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.log);"],"meta":{"line":494,"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.log);"],"meta":{"line":508,"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.log);"],"meta":{"line":522,"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#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":536,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"member","description":"The member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":544,"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":552,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"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":562,"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#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":607,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":21,"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":27,"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":33,"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":39,"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":48,"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":53,"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":218,"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":223,"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":228,"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":233,"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":238,"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":244,"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":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":254,"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":262,"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":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":339,"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":590,"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":600,"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#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":54,"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#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":81,"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.log);"],"meta":{"line":155,"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.log);"],"meta":{"line":205,"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.log);"],"meta":{"line":219,"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.log);"],"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":268,"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#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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":22,"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":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":143,"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":152,"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":161,"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":170,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":179,"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#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":188,"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#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":196,"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":204,"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":217,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":35,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":66,"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":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"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":107,"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":116,"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":125,"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":134,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":286,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":375,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":327,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":332,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":358,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":379,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"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":214,"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#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.log);"],"meta":{"line":246,"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#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":266,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":290,"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":298,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":29,"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":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":43,"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":50,"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":56,"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":68,"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":73,"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":78,"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":89,"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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":99,"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":130,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"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#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":15,"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":24,"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":29,"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":34,"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":39,"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":45,"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":52,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":60,"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":66,"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":75,"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":80,"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":85,"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":90,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":97,"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":103,"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":112,"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":117,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":33,"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":79,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":93,"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.log);"],"meta":{"line":107,"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.log);"],"meta":{"line":121,"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.log);"],"meta":{"line":135,"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.log);"],"meta":{"line":149,"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.log);"],"meta":{"line":163,"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#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":174,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":195,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The name of the permission to test","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":205,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":37,"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":42,"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":47,"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":52,"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":57,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":62,"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":67,"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":214,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"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":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":24,"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":33,"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":43,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"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":53,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":87,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":106,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"The key to filter by","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":118,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"Function used to filter (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]}],"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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"}},{"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":56,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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":96,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":113,"file":"ClientDataResolver.js","path":"src/client"}},{"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","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":131,"file":"ClientDataResolver.js","path":"src/client"}},{"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":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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":168,"file":"ClientDataResolver.js","path":"src/client"}},{"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":131,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":251,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":98,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":217,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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":287,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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":12,"date":1472988426399},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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":138,"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":174,"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"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":75,"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":80,"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":85,"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":90,"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":95,"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":100,"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":105,"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":199,"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":208,"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: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:guildRoleUpdated","name":"guildRoleUpdated","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":35,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":33,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"The client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"The client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":57,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence 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":64,"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":50,"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":57,"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:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":182,"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":192,"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":234,"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":88,"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":111,"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":196,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":208,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":225,"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":233,"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":241,"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":248,"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":255,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":217,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":136,"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":144,"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":157,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":91,"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":101,"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":109,"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":91,"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.log);"],"meta":{"line":215,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":233,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":252,"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":31,"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":36,"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":41,"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":52,"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":78,"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":115,"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":139,"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":191,"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":7,"file":"Shard.js","path":"src/sharding"},"methods":[],"properties":[],"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":12,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","description":"Creates an instance of ShardingManager.","memberof":"ShardingManager","params":[{"name":"file","description":"the path to your file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"the number of shards you would like to spawn","type":{"types":[[["number",""]]]}}]},"methods":[],"properties":[{"id":"ShardingManager#totalShards","name":"totalShards","description":"The amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":28,"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":33,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":43,"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":22,"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":[]}],"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online` or `idle`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":[]}],"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":76,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":64,"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",""]]]}}]}],"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":[]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":63,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":77,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":82,"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":87,"file":"GroupDMChannel.js","path":"src/structures"},"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":92,"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":97,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":15,"file":"Guild.js","path":"src/structures"},"methods":[{"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":142,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"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":165,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"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.log);"],"meta":{"line":424,"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.log);"],"meta":{"line":438,"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.log);"],"meta":{"line":452,"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.log);"],"meta":{"line":466,"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.log);"],"meta":{"line":480,"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.log);"],"meta":{"line":494,"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.log);"],"meta":{"line":508,"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.log);"],"meta":{"line":522,"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#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":536,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"member","description":"The member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":544,"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":552,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"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":562,"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#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":607,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":21,"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":27,"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":33,"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":39,"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":48,"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":53,"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":218,"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":223,"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":228,"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":233,"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":238,"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":244,"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":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":254,"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":262,"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":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":339,"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":590,"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":600,"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#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":54,"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#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":81,"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.log);"],"meta":{"line":155,"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.log);"],"meta":{"line":205,"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.log);"],"meta":{"line":219,"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.log);"],"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":268,"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#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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":22,"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":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":143,"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":152,"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":161,"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":170,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":179,"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#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":188,"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#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":196,"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":204,"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":217,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":35,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":66,"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":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"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":107,"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":116,"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":125,"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":134,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":286,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":375,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":327,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":332,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":358,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":379,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"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":214,"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#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.log);"],"meta":{"line":246,"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#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":266,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":290,"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":298,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":29,"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":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":43,"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":50,"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":56,"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":68,"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":73,"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":78,"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":89,"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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":99,"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":130,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"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#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":15,"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":24,"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":29,"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":34,"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":39,"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":45,"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":52,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":60,"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":66,"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":75,"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":80,"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":85,"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":90,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":97,"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":103,"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":112,"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":117,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":33,"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":79,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":93,"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.log);"],"meta":{"line":107,"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.log);"],"meta":{"line":121,"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.log);"],"meta":{"line":135,"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.log);"],"meta":{"line":149,"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.log);"],"meta":{"line":163,"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#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":174,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":195,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The name of the permission to test","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":205,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":37,"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":42,"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":47,"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":52,"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":57,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":62,"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":67,"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":214,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"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":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":24,"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":33,"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":43,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"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":53,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":87,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":106,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"The key to filter by","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":118,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"Function used to filter (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]}],"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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"}},{"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":56,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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":96,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":113,"file":"ClientDataResolver.js","path":"src/client"}},{"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","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":131,"file":"ClientDataResolver.js","path":"src/client"}},{"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":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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":168,"file":"ClientDataResolver.js","path":"src/client"}},{"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":131,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":251,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":98,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":217,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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":287,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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 340e7f3ae..a52c19bc8 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -1,6 +1,9 @@ const childProcess = require('child_process'); const path = require('path'); +/** + * Represents a Shard spawned by the ShardingManager. + */ class Shard { constructor(manager, id) { this.manager = manager; diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 201249c48..4e49e7b4f 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -1,17 +1,35 @@ -const childProcess = require('child_process'); const path = require('path'); const EventEmitter = require('events').EventEmitter; const Collection = require('../util/Collection'); const Shard = require('./Shard'); +/** + * 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. + * The Sharding Manager is still experimental + * @extends {EventEmitter} + */ class ShardingManager extends EventEmitter { + /** + * Creates an instance of ShardingManager. + * @param {string} file the path to your file + * @param {number} totalShards the number of shards you would like to spawn + */ constructor(file, totalShards) { super(); this.file = file; if (!path.isAbsolute(file)) { this.file = path.resolve(`${process.cwd()}${file}`); } + /** + * The amount of shards that this manager is going to spawn + * @type {number} + */ this.totalShards = totalShards; + /** + * A collection of shards that this manager has spawned. + * @type {Collection} + */ this.shards = new Collection(); this.waiting = new Collection(); } @@ -30,7 +48,7 @@ class ShardingManager extends EventEmitter { if (this.shards.size === this.totalShards) { return clearInterval(interval); } - this.createShard(); + return this.createShard(); }, 5500); } } From 7475f734ac71800a4e90864cc39465a8bf404d57 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 4 Sep 2016 12:31:10 +0100 Subject: [PATCH 323/324] Add debug stuff --- docs/docs.json | 2 +- src/client/ClientManager.js | 2 ++ src/client/rest/RESTMethods.js | 1 + src/client/websocket/WebSocketManager.js | 2 ++ test/random.js | 2 ++ 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 6bcf12135..a6085f76c 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472988426399},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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":138,"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":174,"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"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":75,"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":80,"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":85,"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":90,"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":95,"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":100,"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":105,"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":199,"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":208,"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: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:guildRoleUpdated","name":"guildRoleUpdated","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":35,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":33,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"The client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"The client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":57,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence 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":64,"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":50,"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":57,"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:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":182,"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":192,"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":234,"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":88,"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":111,"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":196,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":208,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":225,"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":233,"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":241,"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":248,"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":255,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":217,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":136,"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":144,"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":157,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":91,"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":101,"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":109,"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":91,"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.log);"],"meta":{"line":215,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":233,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":252,"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":31,"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":36,"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":41,"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":52,"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":78,"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":115,"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":139,"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":191,"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":7,"file":"Shard.js","path":"src/sharding"},"methods":[],"properties":[],"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":12,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","description":"Creates an instance of ShardingManager.","memberof":"ShardingManager","params":[{"name":"file","description":"the path to your file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"the number of shards you would like to spawn","type":{"types":[[["number",""]]]}}]},"methods":[],"properties":[{"id":"ShardingManager#totalShards","name":"totalShards","description":"The amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":28,"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":33,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":43,"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":22,"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":[]}],"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online` or `idle`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":[]}],"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":76,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":64,"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",""]]]}}]}],"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":[]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":63,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":77,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":82,"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":87,"file":"GroupDMChannel.js","path":"src/structures"},"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":92,"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":97,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":15,"file":"Guild.js","path":"src/structures"},"methods":[{"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":142,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"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":165,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"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.log);"],"meta":{"line":424,"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.log);"],"meta":{"line":438,"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.log);"],"meta":{"line":452,"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.log);"],"meta":{"line":466,"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.log);"],"meta":{"line":480,"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.log);"],"meta":{"line":494,"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.log);"],"meta":{"line":508,"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.log);"],"meta":{"line":522,"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#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":536,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"member","description":"The member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":544,"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":552,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"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":562,"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#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":607,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":21,"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":27,"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":33,"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":39,"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":48,"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":53,"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":218,"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":223,"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":228,"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":233,"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":238,"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":244,"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":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":254,"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":262,"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":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":339,"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":590,"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":600,"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#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":54,"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#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":81,"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.log);"],"meta":{"line":155,"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.log);"],"meta":{"line":205,"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.log);"],"meta":{"line":219,"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.log);"],"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":268,"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#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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":22,"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":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":143,"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":152,"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":161,"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":170,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":179,"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#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":188,"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#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":196,"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":204,"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":217,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":35,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":66,"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":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"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":107,"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":116,"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":125,"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":134,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":286,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":375,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":327,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":332,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":358,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":379,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"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":214,"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#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.log);"],"meta":{"line":246,"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#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":266,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":290,"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":298,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":29,"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":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":43,"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":50,"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":56,"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":68,"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":73,"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":78,"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":89,"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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":99,"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":130,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"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#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":15,"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":24,"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":29,"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":34,"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":39,"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":45,"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":52,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":60,"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":66,"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":75,"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":80,"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":85,"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":90,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":97,"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":103,"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":112,"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":117,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":33,"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":79,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":93,"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.log);"],"meta":{"line":107,"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.log);"],"meta":{"line":121,"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.log);"],"meta":{"line":135,"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.log);"],"meta":{"line":149,"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.log);"],"meta":{"line":163,"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#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":174,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":195,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The name of the permission to test","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":205,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":37,"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":42,"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":47,"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":52,"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":57,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":62,"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":67,"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":214,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"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":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":24,"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":33,"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":43,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"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":53,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":87,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":106,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"The key to filter by","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":118,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"Function used to filter (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]}],"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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"}},{"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":56,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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":96,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":113,"file":"ClientDataResolver.js","path":"src/client"}},{"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","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":131,"file":"ClientDataResolver.js","path":"src/client"}},{"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":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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":168,"file":"ClientDataResolver.js","path":"src/client"}},{"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":131,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":251,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":98,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":217,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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":287,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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":12,"date":1472988676333},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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":138,"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":174,"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"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":75,"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":80,"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":85,"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":90,"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":95,"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":100,"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":105,"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":199,"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":208,"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: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:guildRoleUpdated","name":"guildRoleUpdated","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":35,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":33,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"The client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"The client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":57,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence 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":64,"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":50,"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":57,"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:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":184,"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":194,"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":236,"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":88,"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":111,"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":196,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":208,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":225,"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":233,"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":241,"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":248,"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":255,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":217,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":136,"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":144,"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":157,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":91,"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":101,"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":109,"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":91,"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.log);"],"meta":{"line":215,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":233,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":252,"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":31,"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":36,"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":41,"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":52,"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":78,"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":115,"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":139,"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":191,"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":7,"file":"Shard.js","path":"src/sharding"},"methods":[],"properties":[],"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":12,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","description":"Creates an instance of ShardingManager.","memberof":"ShardingManager","params":[{"name":"file","description":"the path to your file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"the number of shards you would like to spawn","type":{"types":[[["number",""]]]}}]},"methods":[],"properties":[{"id":"ShardingManager#totalShards","name":"totalShards","description":"The amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":28,"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":33,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":43,"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":22,"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":[]}],"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online` or `idle`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":[]}],"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":76,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":64,"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",""]]]}}]}],"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":[]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":63,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":77,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":82,"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":87,"file":"GroupDMChannel.js","path":"src/structures"},"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":92,"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":97,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":15,"file":"Guild.js","path":"src/structures"},"methods":[{"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":142,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"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":165,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"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.log);"],"meta":{"line":424,"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.log);"],"meta":{"line":438,"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.log);"],"meta":{"line":452,"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.log);"],"meta":{"line":466,"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.log);"],"meta":{"line":480,"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.log);"],"meta":{"line":494,"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.log);"],"meta":{"line":508,"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.log);"],"meta":{"line":522,"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#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":536,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"member","description":"The member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":544,"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":552,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"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":562,"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#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":607,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":21,"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":27,"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":33,"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":39,"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":48,"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":53,"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":218,"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":223,"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":228,"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":233,"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":238,"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":244,"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":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":254,"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":262,"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":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":339,"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":590,"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":600,"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#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":54,"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#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":81,"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.log);"],"meta":{"line":155,"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.log);"],"meta":{"line":205,"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.log);"],"meta":{"line":219,"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.log);"],"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":268,"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#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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":22,"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":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":143,"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":152,"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":161,"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":170,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":179,"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#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":188,"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#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":196,"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":204,"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":217,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":35,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":66,"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":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"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":107,"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":116,"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":125,"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":134,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":286,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":375,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":327,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":332,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":358,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":379,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"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":214,"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#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.log);"],"meta":{"line":246,"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#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":266,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":290,"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":298,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":29,"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":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":43,"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":50,"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":56,"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":68,"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":73,"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":78,"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":89,"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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":99,"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":130,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"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#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":15,"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":24,"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":29,"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":34,"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":39,"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":45,"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":52,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":60,"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":66,"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":75,"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":80,"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":85,"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":90,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":97,"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":103,"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":112,"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":117,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":33,"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":79,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":93,"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.log);"],"meta":{"line":107,"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.log);"],"meta":{"line":121,"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.log);"],"meta":{"line":135,"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.log);"],"meta":{"line":149,"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.log);"],"meta":{"line":163,"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#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":174,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":195,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The name of the permission to test","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":205,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":37,"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":42,"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":47,"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":52,"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":57,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":62,"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":67,"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":214,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"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":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":24,"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":33,"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":43,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"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":53,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":87,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":106,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"The key to filter by","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":118,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"Function used to filter (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]}],"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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"}},{"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":56,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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":96,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":113,"file":"ClientDataResolver.js","path":"src/client"}},{"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","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":131,"file":"ClientDataResolver.js","path":"src/client"}},{"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":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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":168,"file":"ClientDataResolver.js","path":"src/client"}},{"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":131,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":251,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":98,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":217,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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":287,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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/ClientManager.js b/src/client/ClientManager.js index 5f04379d9..0af72e110 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -25,8 +25,10 @@ class ClientManager { * @param {function} reject Function to run when connection fails */ connectToWebSocket(token, resolve, reject) { + this.client.emit('debug', `authenticated using token ${token}`); this.client.token = token; this.client.rest.methods.getGateway().then(gateway => { + this.client.emit('debug', `using gateway ${gateway}`); this.client.ws.connect(gateway); this.client.once(Constants.Events.READY, () => resolve(token)); }).catch(reject); diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 884841c5e..a9e8fddf5 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -14,6 +14,7 @@ class RESTMethods { loginEmailPassword(email, password) { return new Promise((resolve, reject) => { + this.rest.client.emit('debug', 'client launched using email and password - should use token instead'); this.rest.client.email = email; this.rest.client.password = password; this.rest.makeRequest('post', Constants.Endpoints.login, false, { email, password }) diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 12e905769..3a0233339 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -56,6 +56,7 @@ class WebSocketManager { * @param {string} gateway The gateway to connect to */ connect(gateway) { + this.client.emit('debug', `connecting to gateway ${gateway}`); this.normalReady = false; this.status = Constants.Status.CONNECTING; this.ws = new WebSocket(gateway); @@ -108,6 +109,7 @@ class WebSocketManager { * Run whenever the gateway connections opens up */ eventOpen() { + this.client.emit('debug', 'connection to gateway opened'); if (this.reconnecting) this._sendResume(); else this._sendNewIdentify(); } diff --git a/test/random.js b/test/random.js index 88ebc486c..14c994917 100644 --- a/test/random.js +++ b/test/random.js @@ -14,6 +14,8 @@ client.on('ready', () => { console.log('ready!'); }); +client.on('debug', console.log); + client.on('message', message => { if (true) { if (message.content === 'makechann') { From 0454674ceb9a9268219c71bd343d473ed42ae826 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 4 Sep 2016 12:37:36 +0100 Subject: [PATCH 324/324] document shard --- docs/docs.json | 2 +- src/sharding/Shard.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index a6085f76c..7d9465f5b 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":12,"date":1472988676333},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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":138,"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":174,"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"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":75,"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":80,"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":85,"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":90,"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":95,"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":100,"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":105,"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":199,"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":208,"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: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:guildRoleUpdated","name":"guildRoleUpdated","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":35,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":33,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"The client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"The client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":57,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence 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":64,"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":50,"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":57,"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:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":184,"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":194,"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":236,"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":88,"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":111,"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":196,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":208,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":225,"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":233,"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":241,"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":248,"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":255,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":217,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":136,"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":144,"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":157,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":91,"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":101,"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":109,"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":91,"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.log);"],"meta":{"line":215,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":233,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":252,"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":31,"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":36,"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":41,"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":52,"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":78,"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":115,"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":139,"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":191,"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":7,"file":"Shard.js","path":"src/sharding"},"methods":[],"properties":[],"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":12,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","description":"Creates an instance of ShardingManager.","memberof":"ShardingManager","params":[{"name":"file","description":"the path to your file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"the number of shards you would like to spawn","type":{"types":[[["number",""]]]}}]},"methods":[],"properties":[{"id":"ShardingManager#totalShards","name":"totalShards","description":"The amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":28,"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":33,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":43,"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":22,"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":[]}],"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online` or `idle`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":[]}],"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":76,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":64,"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",""]]]}}]}],"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":[]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":63,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":77,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":82,"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":87,"file":"GroupDMChannel.js","path":"src/structures"},"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":92,"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":97,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":15,"file":"Guild.js","path":"src/structures"},"methods":[{"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":142,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"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":165,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"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.log);"],"meta":{"line":424,"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.log);"],"meta":{"line":438,"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.log);"],"meta":{"line":452,"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.log);"],"meta":{"line":466,"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.log);"],"meta":{"line":480,"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.log);"],"meta":{"line":494,"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.log);"],"meta":{"line":508,"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.log);"],"meta":{"line":522,"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#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":536,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"member","description":"The member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":544,"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":552,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"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":562,"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#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":607,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":21,"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":27,"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":33,"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":39,"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":48,"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":53,"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":218,"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":223,"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":228,"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":233,"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":238,"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":244,"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":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":254,"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":262,"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":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":339,"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":590,"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":600,"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#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":54,"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#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":81,"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.log);"],"meta":{"line":155,"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.log);"],"meta":{"line":205,"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.log);"],"meta":{"line":219,"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.log);"],"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":268,"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#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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":22,"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":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":143,"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":152,"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":161,"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":170,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":179,"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#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":188,"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#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":196,"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":204,"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":217,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":35,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":66,"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":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"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":107,"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":116,"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":125,"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":134,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":286,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":375,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":327,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":332,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":358,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":379,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"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":214,"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#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.log);"],"meta":{"line":246,"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#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":266,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":290,"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":298,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":29,"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":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":43,"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":50,"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":56,"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":68,"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":73,"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":78,"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":89,"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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":99,"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":130,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"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#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":15,"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":24,"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":29,"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":34,"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":39,"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":45,"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":52,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":60,"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":66,"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":75,"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":80,"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":85,"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":90,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":97,"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":103,"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":112,"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":117,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":33,"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":79,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":93,"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.log);"],"meta":{"line":107,"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.log);"],"meta":{"line":121,"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.log);"],"meta":{"line":135,"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.log);"],"meta":{"line":149,"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.log);"],"meta":{"line":163,"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#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":174,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":195,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The name of the permission to test","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":205,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":37,"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":42,"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":47,"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":52,"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":57,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":62,"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":67,"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":214,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"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":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":24,"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":33,"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":43,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"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":53,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":87,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":106,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"The key to filter by","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":118,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"Function used to filter (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]}],"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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"}},{"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":56,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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":96,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":113,"file":"ClientDataResolver.js","path":"src/client"}},{"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","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":131,"file":"ClientDataResolver.js","path":"src/client"}},{"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":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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":168,"file":"ClientDataResolver.js","path":"src/client"}},{"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":131,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":251,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":98,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":217,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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":287,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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":12,"date":1472989062686},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"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":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"emailOrToken","description":"The email or token 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":138,"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":174,"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":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"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":75,"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":80,"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":85,"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":90,"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":95,"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":100,"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":105,"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":199,"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":208,"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: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:guildRoleUpdated","name":"guildRoleUpdated","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":35,"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:userUpdate","name":"userUpdate","description":"Emitted whenever a detail of the logged in User changes - e.g. username.","memberof":"Client","meta":{"line":33,"file":"UserUpdate.js","path":"src/client/actions"},"params":[{"name":"oldClientUser","description":"The client user before the update.","type":{"types":[[["ClientUser",""]]]}},{"name":"newClientUser","description":"The client user after the update.","type":{"types":[[["ClientUser",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"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":14,"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 user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":57,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the presence update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the presence 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":64,"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":50,"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":57,"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:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":184,"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":194,"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":236,"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":88,"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":111,"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":196,"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#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":208,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":225,"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":233,"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":241,"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":248,"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":255,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"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":217,"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":36,"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:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":136,"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":144,"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":157,"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#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":59,"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":78,"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#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":32,"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":91,"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":101,"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":109,"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":91,"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.log);"],"meta":{"line":215,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}}]},{"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');\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream);\n })\n .catch(console.log);"],"meta":{"line":233,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":242,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}}]},{"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":252,"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":31,"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":36,"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":41,"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":52,"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":78,"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":115,"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":139,"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":191,"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":7,"file":"Shard.js","path":"src/sharding"},"methods":[],"properties":[{"id":"Shard#manager","name":"manager","description":"The manager of the spawned shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":13,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"The shard id","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"The process of the shard","memberof":"Shard","type":{"types":[[["process",""]]]},"meta":{"line":23,"file":"Shard.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":12,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","description":"Creates an instance of ShardingManager.","memberof":"ShardingManager","params":[{"name":"file","description":"the path to your file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"the number of shards you would like to spawn","type":{"types":[[["number",""]]]}}]},"methods":[],"properties":[{"id":"ShardingManager#totalShards","name":"totalShards","description":"The amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":28,"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":33,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[]},{"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.log); // log error"],"meta":{"line":43,"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":22,"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":[]}],"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.log);"],"meta":{"line":36,"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.log);"],"meta":{"line":51,"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('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"meta":{"line":66,"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.log);"],"meta":{"line":80,"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 and playing game of the logged in client.","memberof":"ClientUser","examples":["// set status\nclient.user.setStatus('status', 'game')\n .then(user => console.log('Changed status!'))\n .catch(console.log);"],"meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"The status, can be `online` or `idle`","optional":true,"type":{"types":[[["string",""]]]}},{"name":"game","description":"The game that is being played","optional":true,"type":{"types":[[["string",""]],[["Object",""]]]}}]},{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":14,"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":19,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":11,"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":38,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"DMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"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":24,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last sent message, if available","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":29,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":[]}],"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":76,"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":18,"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":27,"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":32,"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":38,"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":43,"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":51,"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":64,"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",""]]]}}]}],"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":[]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"GroupDMChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"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":63,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"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":77,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The ID of this Group DM Channel.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":82,"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":87,"file":"GroupDMChannel.js","path":"src/structures"},"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":92,"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":97,"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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":22,"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":15,"file":"Guild.js","path":"src/structures"},"methods":[{"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":142,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":154,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]],[["null",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"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":165,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"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.log);"],"meta":{"line":354,"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, as of now this is just a blank role.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"meta":{"line":367,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":380,"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.log);"],"meta":{"line":393,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"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.log);"],"meta":{"line":410,"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.log);"],"meta":{"line":424,"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.log);"],"meta":{"line":438,"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.log);"],"meta":{"line":452,"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.log);"],"meta":{"line":466,"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.log);"],"meta":{"line":480,"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.log);"],"meta":{"line":494,"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.log);"],"meta":{"line":508,"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.log);"],"meta":{"line":522,"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#unban","name":"unban","description":"Unbans a member from the Guild","memberof":"Guild","examples":["// unban a member\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":536,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"member","description":"The member to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":544,"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":552,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"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":562,"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#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":607,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":21,"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":27,"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":33,"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":39,"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":48,"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":53,"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":218,"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":223,"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":228,"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":233,"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":238,"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":244,"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":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"An array of guild emojis.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":254,"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":262,"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":267,"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":272,"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":277,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":339,"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":590,"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":600,"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#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":54,"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#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":81,"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.log);"],"meta":{"line":155,"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.log);"],"meta":{"line":205,"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.log);"],"meta":{"line":219,"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.log);"],"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":268,"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#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":43,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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":22,"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":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":8,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":143,"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":152,"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":161,"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":170,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":179,"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#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":188,"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#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":196,"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":204,"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":217,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":14,"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":19,"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":24,"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":35,"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":40,"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":45,"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":50,"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":55,"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":60,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this meember is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":66,"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":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinDate","name":"joinDate","description":"The date this member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":79,"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":88,"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":107,"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":116,"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":125,"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":134,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":286,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":375,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":327,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":332,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":358,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":379,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel","meta":{"line":28,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":103,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":34,"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":43,"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":49,"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":56,"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":62,"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":68,"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":74,"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":81,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channels","name":"channels","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":88,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#creationDate","name":"creationDate","description":"The creation date of the invite","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":95,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"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":214,"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#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.log);"],"meta":{"line":246,"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#edit","name":"edit","description":"Edit the content of a 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.log);"],"meta":{"line":266,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["string",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to a 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.log);"],"meta":{"line":281,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":290,"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":298,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]}],"properties":[{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":29,"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":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":43,"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":50,"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":56,"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":68,"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":73,"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":78,"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":89,"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#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":99,"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":130,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#timestamp","name":"timestamp","description":"When the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":137,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":145,"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":15,"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":24,"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":29,"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":34,"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":39,"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":44,"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":49,"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":54,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"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#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":15,"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":24,"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":29,"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":34,"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":39,"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":45,"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":52,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":60,"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":66,"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":75,"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":80,"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":85,"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":90,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":97,"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":103,"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":112,"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":117,"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#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":26,"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":31,"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":36,"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":41,"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":25,"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":30,"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":35,"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":33,"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#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"file":"PermissionOverwrites.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#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.log);"],"meta":{"line":79,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"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.log);"],"meta":{"line":93,"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.log);"],"meta":{"line":107,"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.log);"],"meta":{"line":121,"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.log);"],"meta":{"line":135,"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.log);"],"meta":{"line":149,"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.log);"],"meta":{"line":163,"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#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":174,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Whether or not the role includes the given 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":195,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The name of the permission to test","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"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":205,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":17,"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":37,"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":42,"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":47,"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":52,"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":57,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":62,"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":67,"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":214,"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"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":"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":8,"file":"User.js","path":"src/structures"},"methods":[{"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":63,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"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":81,"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":91,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#sendFile"]}],"properties":[{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":19,"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":24,"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":29,"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":34,"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":39,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#status","name":"status","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":53,"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":72,"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.log);"],"meta":{"line":43,"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.log);"],"meta":{"line":56,"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":66,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"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":54,"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#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":81,"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.log);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":155,"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.log);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":205,"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.log);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":219,"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.log);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":233,"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#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":247,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":268,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":15,"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":24,"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":29,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#topic","name":"topic","description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":24,"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":29,"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":34,"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":40,"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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values())[0];"],"meta":{"line":24,"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":33,"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":43,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"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":53,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[key] === value` of the collection","memberof":"Collection","examples":["collection.getAll('username', 'Bob');"],"meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[key] === value`","memberof":"Collection","examples":["collection.get('id', '123123...');"],"meta":{"line":87,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"key","description":"The key to filter by","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[key] === value`","memberof":"Collection","examples":["if (collection.exists('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":106,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"key","description":"The key to filter by","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":118,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"callback","description":"Function used to filter (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to set as this when filtering","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Functionally identical shortcut to `collection.array().map(...)`.","memberof":"Collection","meta":{"line":131,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"callback","description":"Function that produces an element of the new Array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Optional. Value to use as this when executing callback.","optional":true,"type":{"types":[["*",""]]}}]}],"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#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.","memberof":"TextBasedChannel","meta":{"line":24,"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#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.log);"],"meta":{"line":53,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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.log);"],"meta":{"line":68,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["string",""]]]}},{"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":78,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"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.log);"],"meta":{"line":122,"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#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":143,"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":171,"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":213,"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":241,"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#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]}],"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#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":186,"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":194,"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"}},{"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":56,"file":"ClientDataResolver.js","path":"src/client"}},{"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":73,"file":"ClientDataResolver.js","path":"src/client"}},{"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":96,"file":"ClientDataResolver.js","path":"src/client"}},{"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 ID of a Channel","type":{"types":[[["Channel",""]],[["string",""]]]},"meta":{"line":113,"file":"ClientDataResolver.js","path":"src/client"}},{"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","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":131,"file":"ClientDataResolver.js","path":"src/client"}},{"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":149,"file":"ClientDataResolver.js","path":"src/client"}},{"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":168,"file":"ClientDataResolver.js","path":"src/client"}},{"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":131,"file":"GuildChannel.js","path":"src/structures"}},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite:\n```js\n{\n temporary: false, // whether the invite should kick users after 24hrs if they are not given a new role\n maxAge: 0, // the time in seconds the invite expires in\n maxUses: 0, // the maximum amount of uses for this invite\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":251,"file":"GuildChannel.js","path":"src/structures"}},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":31,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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.\n```js\n{\n limit: 30, // the message limit, defaults to 50\n before: '123', // gets messages before the given message ID\n after: '123', // gets messages after the given message ID\n around: '123', // gets messages around the given message ID\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":98,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:\n```js\n{\n errors: [], // an array of stop/end reasons that cause the promise to reject.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":217,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"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":287,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.\n```js\n{\n time: null, // time in milliseconds. If specified, the collector ends after this amount of time.\n max: null, // the maximum amount of messages to handle before ending.\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"id":"ClientOptions","name":"ClientOptions","description":"Options that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential',\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"}}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

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

\r\n\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js) [![Documentation Status](https://readthedocs.org/projects/discordjs/badge/?version=latest)](http://discordjs.readthedocs.org/en/latest/?badge=latest)\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\n# Welcome!\r\nWelcome to the discord.js rewrite documentation. The rewrite has taken a lot of time, but it should be much more\r\nstable and performance-friendly than previous versions.\r\n\r\n## Installation\r\n`npm i --save hydrabolt/discord.js#indev-rewrite`"},{"category":"general","name":"Updating your code","data":"# About the Rewrite\r\nThe rewrite takes a much more OOP approach than previous versions, which allows code to be much more manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions and it also has support for new Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nThe rewrite has a _lot_ of breaking changes. Major methods, e.g. `client.sendMessage(channel, message)` have been moved\r\nfrom the Client class towards their respective classes - `textChannel.sendMessage(message)`. You can find out the full\r\nextent of these changes by looking at the classes in the documentation.\r\n\r\nAdditionally, some event names and parameters have changed - you should revisit these.\r\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 a52c19bc8..08c37bab5 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -6,8 +6,20 @@ const path = require('path'); */ class Shard { constructor(manager, id) { + /** + * The manager of the spawned shard + * @type {ShardingManager} + */ this.manager = manager; + /** + * The shard id + * @type {number} + */ this.id = id; + /** + * The process of the shard + * @type {process} + */ this.process = childProcess.fork(path.resolve(this.manager.file), [id, this.manager.shards.size]); } }